diff --git a/src/osgPlugins/curl/ReaderWriterCURL.cpp b/src/osgPlugins/curl/ReaderWriterCURL.cpp index 136863144..83aee7b20 100644 --- a/src/osgPlugins/curl/ReaderWriterCURL.cpp +++ b/src/osgPlugins/curl/ReaderWriterCURL.cpp @@ -123,11 +123,14 @@ osgDB::ReaderWriter::ReadResult EasyCurl::read(const std::string& proxyAddress, // use for https. // curl_easy_setopt(_curl, CURLOPT_KEYPASSWD, password.c_str()); +#if LIBCURL_VERSION_NUM >= 0x070a07 if (details->httpAuthentication != _previousHttpAuthentication) { curl_easy_setopt(_curl, CURLOPT_HTTPAUTH, details->httpAuthentication); _previousHttpAuthentication = details->httpAuthentication; } +#endif + } else { @@ -136,13 +139,15 @@ osgDB::ReaderWriter::ReadResult EasyCurl::read(const std::string& proxyAddress, curl_easy_setopt(_curl, CURLOPT_USERPWD, 0); _previousPassword.clear(); } - + +#if LIBCURL_VERSION_NUM >= 0x070a07 // need to reset if previously set. if (_previousHttpAuthentication!=0) { curl_easy_setopt(_curl, CURLOPT_HTTPAUTH, 0); _previousHttpAuthentication = 0; } +#endif } curl_easy_setopt(_curl, CURLOPT_URL, fileName.c_str()); @@ -154,6 +159,8 @@ osgDB::ReaderWriter::ReadResult EasyCurl::read(const std::string& proxyAddress, if (res==0) { + +#if LIBCURL_VERSION_NUM >= 0x070a07 long code; if(!proxyAddress.empty()) { @@ -191,13 +198,19 @@ osgDB::ReaderWriter::ReadResult EasyCurl::read(const std::string& proxyAddress, return rr; } +#endif return osgDB::ReaderWriter::ReadResult::FILE_LOADED; } else { - osg::notify(osg::NOTICE)<<"Error: libcurl read error, file="<