|
From: <fe...@us...> - 2012-06-08 03:29:14
|
Revision: 152
http://ehs.svn.sourceforge.net/ehs/?rev=152&view=rev
Author: felfert
Date: 2012-06-08 03:29:07 +0000 (Fri, 08 Jun 2012)
Log Message:
-----------
- Fixed close handling
Modified Paths:
--------------
trunk/ehs.cpp
Modified: trunk/ehs.cpp
===================================================================
--- trunk/ehs.cpp 2012-06-07 15:43:04 UTC (rev 151)
+++ trunk/ehs.cpp 2012-06-08 03:29:07 UTC (rev 152)
@@ -915,11 +915,8 @@
}
EHS_TRACE("Sending HTTP response", "");
HttpResponse *response = reinterpret_cast<HttpResponse *>(gresp);
- if (HTTPRESPONSECODE_101_SWITCHING_PROTOCOLS == response->GetResponseCode()) {
- // Make shure, that we don't close the connaction when switching protocols
- response->RemoveHeader("Connection");
- }
- forceClose = (0 == response->Header("connection").compare("close"));
+ forceClose = ((0 == response->Header("connection").compare("close")) &&
+ (HTTPRESPONSECODE_101_SWITCHING_PROTOCOLS != response->GetResponseCode()));
ostringstream oss;
// add in the response code
oss << "HTTP/1.1 " << response->GetResponseCode()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|