From 136b663cef9aae7759b1319652e1e88017ecf8fc Mon Sep 17 00:00:00 2001 From: xcps Date: Fri, 18 Mar 2016 10:00:10 -0400 Subject: [PATCH] strip connection http header --- HTTPProxy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HTTPProxy.cpp b/HTTPProxy.cpp index 160c27f6..fc2e0c22 100644 --- a/HTTPProxy.cpp +++ b/HTTPProxy.cpp @@ -204,14 +204,14 @@ namespace proxy if (eol) { *eol = 0; eol++; - if (strncmp ((const char *)http_buff, "Referer", 7)) // strip out referer + if (strncmp ((const char *)http_buff, "Referer", 7) && strncmp ((const char *)http_buff, "Connection", 10)) // strip out referer and connection { if (!strncmp ((const char *)http_buff, "User-Agent", 10)) // replace UserAgent m_request.append("User-Agent: MYOB/6.66 (AN/ON)"); else m_request.append ((const char *)http_buff); m_request.append ("\r\n"); - } + } isEndOfHeader = !http_buff[0]; auto l = eol - http_buff; http_buff = eol;