From cb8a4656056d5ea94ebaac18ad3d52d83af3b61a Mon Sep 17 00:00:00 2001 From: "Francisco Blas (klondike) Izquierdo Riera" Date: Wed, 7 Jan 2015 02:40:30 +0100 Subject: [PATCH] Force Connection: Close and allow http/1.1 --- HTTPProxy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HTTPProxy.cpp b/HTTPProxy.cpp index 4bc7aedc..bb1dd214 100644 --- a/HTTPProxy.cpp +++ b/HTTPProxy.cpp @@ -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; @@ -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(http_buff),len); return true; }