Fine tune of private (libcwd) assertion.

It turns out that it's possible to receive data before an upload
finished when the server sends HTTP_BAD_REQUEST in the middle of the
upload (this happens to me when I try to upload a 6000x6000 image to my
profile feed, with is a 44MB file). So, in that case the finished upload
detection did not fail and we shouldn't assert.
This commit is contained in:
Aleric Inglewood
2013-01-11 01:28:46 +01:00
parent 5daf817e7e
commit 741a160913
3 changed files with 32 additions and 12 deletions

View File

@@ -1276,7 +1276,7 @@ static int const HTTP_REDIRECTS_DEFAULT = 10;
LLChannelDescriptors const BufferedCurlEasyRequest::sChannels;
BufferedCurlEasyRequest::BufferedCurlEasyRequest() : mRequestTransferedBytes(0), mResponseTransferedBytes(0), mBufferEventsTarget(NULL)
BufferedCurlEasyRequest::BufferedCurlEasyRequest() : mRequestTransferedBytes(0), mResponseTransferedBytes(0), mBufferEventsTarget(NULL), mStatus(HTTP_INTERNAL_ERROR)
{
AICurlInterface::Stats::BufferedCurlEasyRequest_count++;
}
@@ -1336,8 +1336,13 @@ void BufferedCurlEasyRequest::resetState(void)
// Call base class implementation.
CurlEasyRequest::resetState();
// Reset local variables.
mOutput.reset();
mInput.reset();
mRequestTransferedBytes = 0;
mResponseTransferedBytes = 0;
mBufferEventsTarget = NULL;
mStatus = HTTP_INTERNAL_ERROR;
}
void BufferedCurlEasyRequest::print_diagnostics(CURLcode code)