diff --git a/autobuild.xml b/autobuild.xml index 4e8d92a979fb9441809865db3a15aee360ac47fe..bee2d29d9f6635317c4a92b209516d68166adcc3 100755 --- a/autobuild.xml +++ b/autobuild.xml @@ -212,9 +212,9 @@ <key>archive</key> <map> <key>hash</key> - <string>89db4a1aa22599cf377ae49630b7b5b1</string> + <string>aaaedcd3b0b52b65181a64daa091fe10</string> <key>url</key> - <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/curl_3p-update-curl/rev/301717/arch/Darwin/installer/curl-7.42.1.301717-darwin-301717.tar.bz2</string> + <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-curl/rev/311279/arch/Darwin/installer/curl-7.47.0.311279-darwin-311279.tar.bz2</string> </map> <key>name</key> <string>darwin</string> @@ -224,9 +224,9 @@ <key>archive</key> <map> <key>hash</key> - <string>de9e0c855ff6ee30c9e027a70bbef032</string> + <string>cfe7789e8f76c9781021ab1b9b4ec3c2</string> <key>url</key> - <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/curl_3p-update-curl/rev/301717/arch/Linux/installer/curl-7.42.1.301717-linux-301717.tar.bz2</string> + <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-curl/rev/311279/arch/Linux/installer/curl-7.47.0.311279-linux-311279.tar.bz2</string> </map> <key>name</key> <string>linux</string> @@ -236,16 +236,16 @@ <key>archive</key> <map> <key>hash</key> - <string>98d15713de8c439b7f54cc14f2df07ac</string> + <string>9109ad560200701443f9b41389044c38</string> <key>url</key> - <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/curl_3p-update-curl/rev/301717/arch/CYGWIN/installer/curl-7.42.1.301717-windows-301717.tar.bz2</string> + <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-curl/rev/311279/arch/CYGWIN/installer/curl-7.47.0.311279-windows-311279.tar.bz2</string> </map> <key>name</key> <string>windows</string> </map> </map> <key>version</key> - <string>7.42.1.301717</string> + <string>7.47.0.311279</string> </map> <key>db</key> <map> diff --git a/indra/llcorehttp/_httplibcurl.cpp b/indra/llcorehttp/_httplibcurl.cpp index d918c2ee1bde7f6dec340bc8c66bd5617413d2e2..c25e01a318bfbcc660b6a5fc905cdd3776862507 100755 --- a/indra/llcorehttp/_httplibcurl.cpp +++ b/indra/llcorehttp/_httplibcurl.cpp @@ -301,7 +301,14 @@ bool HttpLibcurl::completeRequest(CURLM * multi_handle, CURL * handle, CURLcode { HttpHandle ophandle(NULL); - curl_easy_getinfo(handle, CURLINFO_PRIVATE, &ophandle); + CURLcode ccode(CURLE_OK); + + ccode = curl_easy_getinfo(handle, CURLINFO_PRIVATE, &ophandle); + if (ccode) + { + LL_WARNS(LOG_CORE) << "libcurl error: " << ccode << " Unable to retrieve operation handle from CURL handle" << LL_ENDL; + return false; + } HttpOpRequest::ptr_t op(HttpOpRequest::fromHandle<HttpOpRequest>(ophandle)); if (!op) @@ -343,22 +350,36 @@ bool HttpLibcurl::completeRequest(CURLM * multi_handle, CURL * handle, CURLcode if (handle) { - curl_easy_getinfo(handle, CURLINFO_RESPONSE_CODE, &http_status); - if (http_status >= 100 && http_status <= 999) + ccode = curl_easy_getinfo(handle, CURLINFO_RESPONSE_CODE, &http_status); + if (ccode == CURLE_OK) { - char * cont_type(NULL); - curl_easy_getinfo(handle, CURLINFO_CONTENT_TYPE, &cont_type); - if (cont_type) + if (http_status >= 100 && http_status <= 999) + { + char * cont_type(NULL); + ccode = curl_easy_getinfo(handle, CURLINFO_CONTENT_TYPE, &cont_type); + if (ccode == CURLE_OK) + { + if (cont_type) + { + op->mReplyConType = cont_type; + } + } + else + { + LL_WARNS(LOG_CORE) << "CURL error:" << ccode << " Attempting to get content type." << LL_ENDL; + } + op->mStatus = HttpStatus(http_status); + } + else { - op->mReplyConType = cont_type; + LL_WARNS(LOG_CORE) << "Invalid HTTP response code (" + << http_status << ") received from server." + << LL_ENDL; + op->mStatus = HttpStatus(HttpStatus::LLCORE, HE_INVALID_HTTP_STATUS); } - op->mStatus = HttpStatus(http_status); } else { - LL_WARNS(LOG_CORE) << "Invalid HTTP response code (" - << http_status << ") received from server." - << LL_ENDL; op->mStatus = HttpStatus(HttpStatus::LLCORE, HE_INVALID_HTTP_STATUS); } } diff --git a/indra/llcorehttp/_httpoperation.cpp b/indra/llcorehttp/_httpoperation.cpp index 333f20d2815fd1f484e61a9d9e27ca94cfa7f338..3fc4e289105d481ee426bf574dbe9aa9efd83eb6 100755 --- a/indra/llcorehttp/_httpoperation.cpp +++ b/indra/llcorehttp/_httpoperation.cpp @@ -179,6 +179,9 @@ HttpOperation::ptr_t HttpOperation::findByHandle(HttpHandle handle) { wptr_t weak; + if (!handle) + return ptr_t(); + { LLCoreInt::HttpScopedLock lock(mOpMutex); diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp index 557f6207b5a0d96316e644349e9d0717625b9aac..db57869a1bb323109bec3a664f6298bd9f75c66d 100755 --- a/indra/llcorehttp/_httpoprequest.cpp +++ b/indra/llcorehttp/_httpoprequest.cpp @@ -750,7 +750,11 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service) xfer_timeout *= 2L; } // *DEBUG: Enable following override for timeout handling and "[curl:bugs] #1420" tests - // xfer_timeout = 1L; + //if (cpolicy.mPipelining) + //{ + // xfer_timeout = 1L; + // timeout = 1L; + //} code = curl_easy_setopt(mCurlHandle, CURLOPT_TIMEOUT, xfer_timeout); check_curl_easy_code(code, CURLOPT_TIMEOUT); code = curl_easy_setopt(mCurlHandle, CURLOPT_CONNECTTIMEOUT, timeout); diff --git a/indra/llcorehttp/_httppolicy.cpp b/indra/llcorehttp/_httppolicy.cpp index fd78a5dadcec211c942d17abf96f0a04f5ffedf1..b2709b53ecf76e3405920100a2b15f253b31e46c 100755 --- a/indra/llcorehttp/_httppolicy.cpp +++ b/indra/llcorehttp/_httppolicy.cpp @@ -416,7 +416,7 @@ bool HttpPolicy::stageAfterCompletion(const HttpOpRequest::ptr_t &op) #if 0 if (op->mStatus == HttpStatus(HttpStatus::EXT_CURL_EASY, CURLE_OPERATION_TIMEDOUT)) { - LL_WARNS(LOG_CORE) << "HTTP request " << static_cast<HttpHandle>(op) + LL_WARNS(LOG_CORE) << "HTTP request " << op->getHandle() << " timed out." << LL_ENDL; } diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 46fd9a27e37bc7b47923cf24e67a0e02fd669f77..d5549013fabd8f903e1ef995672ae60e07994e42 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4557,7 +4557,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>0</integer> + <integer>1</integer> </map> <key>HttpRangeRequestsDisable</key> <map> diff --git a/indra/newview/llappcorehttp.cpp b/indra/newview/llappcorehttp.cpp index c13c4f982a9de9830bef6ec22a69adadb2f9c54c..7dee309a6238c5ddfbdc6c7e3284724d96b93a62 100755 --- a/indra/newview/llappcorehttp.cpp +++ b/indra/newview/llappcorehttp.cpp @@ -125,7 +125,7 @@ LLAppCoreHttp::LLAppCoreHttp() mStopHandle(LLCORE_HTTP_HANDLE_INVALID), mStopRequested(0.0), mStopped(false), - mPipelined(false) + mPipelined(true) {} @@ -359,7 +359,7 @@ void LLAppCoreHttp::refreshSettings(bool initial) static const std::string http_pipelining("HttpPipelining"); if (gSavedSettings.controlExists(http_pipelining)) { - // Default to false (in ctor) if absent. + // Default to true (in ctor) if absent. bool pipelined(gSavedSettings.getBOOL(http_pipelining)); if (pipelined != mPipelined) {