From 96a771ef8bc7305d58fc3410f0e6fcfbf194a90f Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 29 Dec 2008 07:31:33 +0000 Subject: [PATCH] only accept gzip encoding for bottled http requests --- src/http_connection.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/http_connection.cpp b/src/http_connection.cpp index f0d20d864..32a978168 100644 --- a/src/http_connection.cpp +++ b/src/http_connection.cpp @@ -109,9 +109,11 @@ void http_connection::get(std::string const& url, time_duration timeout, int pri if (!user_agent.empty()) headers << "User-Agent: " << user_agent << "\r\n"; + if (m_bottled) + headers << "Accept-Encoding: gzip\r\n"; + headers << "Connection: close\r\n" - "Accept-Encoding: gzip\r\n" "\r\n"; sendbuffer = headers.str();