Possible upload timeout improvement.
When uploading finishes, but is not detected, the timeout should be for "reply delay", the time that the server takes before it replies, and not CurlTimeoutLowSpeedTime. This patch adds code that takes this failure into account (which happened only ONCE for me on Metropolis while flying around and using trickle (not sure if that is relevant), so it's not that likely to improvement anything in practise. Note that it is detected by an assertion when it happens, so that we can safely assume it normally never happened on SL). * Generalized PUT / POST configuration by adding CurlEasyRequest::setPut, which now also supports keep-alive (which still isn't used). * Upload content length is now stored in CurlEasyRequest::mContentLength * CurlEasyRequest::has_stalled() now return false if it was possbile that the 'upload finished' detect failed AND calls upload_finished() itself in that case, so it is no longer 'const'. * If low speed is detect exactly when the last bytes are being attempted to be sent (unlikely scenario), then the upload gets 4 more seconds after which is switches to CurlTimeoutReplyDelay. * Added EDoesAuthentication and EAllowCompressedReply to replace booleans, for readability and type-safety, as did EKeepAlive. Note that this change inverts the meaning of the compression related parameter. * Unrelated: removed an unnecessary #include "llurlrequest.h" from llxmlrpcresponder.h
This commit is contained in:
@@ -1343,7 +1343,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
}
|
||||
LLHTTPClient::request(mUrl, LLHTTPClient::HTTP_GET, NULL,
|
||||
new HTTPGetResponder(mFetcher, mID, LLTimer::getTotalTime(), mRequestedSize, mRequestedOffset, true),
|
||||
headers/*,*/ DEBUG_CURLIO_PARAM(false), keep_alive, false, false, NULL, 0, NULL);
|
||||
headers/*,*/ DEBUG_CURLIO_PARAM(false), keep_alive, no_does_authentication, allow_compressed_reply, NULL, 0, NULL);
|
||||
res = true;
|
||||
}
|
||||
if (!res)
|
||||
|
||||
Reference in New Issue
Block a user