[Box Backup-commit] COMMIT r3596 - box/trunk/lib/httpserver
subversion at boxbackup.org
subversion at boxbackup.org
Fri Jul 31 07:40:22 BST 2015
Author: chris
Date: 2015-07-31 06:40:22 +0000 (Fri, 31 Jul 2015)
New Revision: 3596
Modified:
box/trunk/lib/httpserver/S3Client.cpp
Log:
Fix S3Client handling of "Connection: close" responses.
We can't continue to use the same connection after receiving such a response,
so close it immediately.
Modified: box/trunk/lib/httpserver/S3Client.cpp
===================================================================
--- box/trunk/lib/httpserver/S3Client.cpp 2015-07-31 06:40:09 UTC (rev 3595)
+++ box/trunk/lib/httpserver/S3Client.cpp 2015-07-31 06:40:22 UTC (rev 3596)
@@ -224,9 +224,9 @@
HTTPResponse S3Client::SendRequest(HTTPRequest& rRequest,
IOStream* pStreamToSend, const char* pStreamContentType)
-{
+{
HTTPResponse response;
-
+
if (pStreamToSend)
{
rRequest.SendWithStream(*mapClientSocket,
@@ -238,6 +238,11 @@
rRequest.Send(*mapClientSocket, 30000 /* milliseconds */);
response.Receive(*mapClientSocket, 30000 /* milliseconds */);
}
-
+
+ if(!response.IsKeepAlive())
+ {
+ mapClientSocket.reset();
+ }
+
return response;
}
More information about the Boxbackup-commit
mailing list