Skip to content

Commit

Permalink
Force Connection: Close and allow http/1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
klondi committed Jan 7, 2015
1 parent fe13a85 commit cb8a465
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions HTTPProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ namespace proxy
}

bool HTTPProxyHandler::ValidateHTTPRequest() {
if ( m_version != "HTTP/1.0" ) {
//TODO: we want to support 1.1 in the future
if ( m_version != "HTTP/1.0" && m_version != "HTTP/1.1" ) {
LogPrint(eLogError,"--- HTTP Proxy unsupported version: ", m_version);
HTTPRequestFailed(); //TODO: send right stuff
return false;
Expand All @@ -93,6 +92,7 @@ namespace proxy
m_request += m_version;
m_request.push_back('\r');
m_request.push_back('\n');
m_request.append("Connection: close\r\n");
m_request.append(reinterpret_cast<const char *>(http_buff),len);
return true;
}
Expand Down

0 comments on commit cb8a465

Please sign in to comment.