MAINT-6137: Re enable pipelining by default, use new version of CURL (7.47) with corrections for timed out connections in pipelining. Minor fix for safer op retrieval.
parent
70d4c0ad7d
commit
bfabb7bd2b
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
op->mReplyConType = cont_type;
|
||||
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
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -179,6 +179,9 @@ HttpOperation::ptr_t HttpOperation::findByHandle(HttpHandle handle)
|
|||
{
|
||||
wptr_t weak;
|
||||
|
||||
if (!handle)
|
||||
return ptr_t();
|
||||
|
||||
{
|
||||
LLCoreInt::HttpScopedLock lock(mOpMutex);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4557,7 +4557,7 @@
|
|||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>HttpRangeRequestsDisable</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue