Merge remote-tracking branch 'Aleric/master' into Cupcake
This commit is contained in:
@@ -1334,18 +1334,17 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
mRequestedOffset--;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Will call callbackHttpGet when curl request completes
|
||||
AIHTTPHeaders headers("Accept", "image/x-j2c");
|
||||
LLHTTPClient::getByteRange(mUrl, mRequestedOffset, mRequestedSize,
|
||||
new HTTPGetResponder(mFetcher, mID, LLTimer::getTotalTime(), mRequestedSize, mRequestedOffset, true), headers);
|
||||
res = true;
|
||||
}
|
||||
catch(AICurlNoEasyHandle const& error)
|
||||
{
|
||||
llwarns << error.what() << llendl;
|
||||
}
|
||||
// Will call callbackHttpGet when curl request completes
|
||||
AIHTTPHeaders headers("Accept", "image/x-j2c");
|
||||
// Call LLHTTPClient::request directly instead of LLHTTPClient::getByteRange, because we want to pass a NULL AIEngine.
|
||||
if (mRequestedOffset > 0 || mRequestedSize > 0)
|
||||
{
|
||||
headers.addHeader("Range", llformat("bytes=%d-%d", mRequestedOffset, mRequestedOffset + mRequestedSize - 1));
|
||||
}
|
||||
LLHTTPClient::request(mUrl, LLHTTPClient::HTTP_GET, NULL,
|
||||
new HTTPGetResponder(mFetcher, mID, LLTimer::getTotalTime(), mRequestedSize, mRequestedOffset, true),
|
||||
headers/*,*/ DEBUG_CURLIO_PARAM(false), keep_alive, no_does_authentication, allow_compressed_reply, NULL, 0, NULL);
|
||||
res = true;
|
||||
}
|
||||
if (!res)
|
||||
{
|
||||
@@ -1370,14 +1369,21 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
if (mRequestedSize < 0)
|
||||
{
|
||||
S32 max_attempts;
|
||||
if (mGetStatus == HTTP_NOT_FOUND || mGetStatus == 499)
|
||||
if (mGetStatus == HTTP_NOT_FOUND || mGetStatus == HTTP_INTERNAL_ERROR_CURL_TIMEOUT || mGetStatus == HTTP_INTERNAL_ERROR_LOW_SPEED)
|
||||
{
|
||||
mHTTPFailCount = max_attempts = 1; // Don't retry
|
||||
if(mGetStatus == HTTP_NOT_FOUND)
|
||||
llwarns << "Texture missing from server (404): " << mUrl << llendl;
|
||||
else if (mGetStatus == 499)
|
||||
else if (mGetStatus == HTTP_INTERNAL_ERROR_CURL_TIMEOUT || mGetStatus == HTTP_INTERNAL_ERROR_LOW_SPEED)
|
||||
{
|
||||
llwarns << "No response from server (499): " << mUrl << llendl;
|
||||
if (mGetStatus == HTTP_INTERNAL_ERROR_CURL_TIMEOUT)
|
||||
{
|
||||
llwarns << "No response from server (HTTP_INTERNAL_ERROR_CURL_TIMEOUT): " << mUrl << llendl;
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Slow response from server (HTTP_INTERNAL_ERROR_LOW_SPEED): " << mUrl << llendl;
|
||||
}
|
||||
SGHostBlackList::add(mUrl, 60.0, mGetStatus);
|
||||
}
|
||||
//roll back to try UDP
|
||||
|
||||
Reference in New Issue
Block a user