diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-09-23 21:51:53 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-09-23 21:51:53 +0900 |
| commit | 8b0bdacace9c914818905c6a9a4d398fc11ffab6 (patch) | |
| tree | 36a8b4d642f13e34491f62a30c77799f44e39897 /src/HttpRequest.cc | |
| parent | 54665ff4093f4517104fe36c1b58f9a339710adf (diff) | |
Don't send Proxy-Connection header field
It was deprecated long ago.
Diffstat (limited to 'src/HttpRequest.cc')
| -rw-r--r-- | src/HttpRequest.cc | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc index 09254d1c..837f91de 100644 --- a/src/HttpRequest.cc +++ b/src/HttpRequest.cc @@ -209,9 +209,7 @@ std::string HttpRequest::createRequest() } if(proxyRequest_) { if(request_->isKeepAliveEnabled() || request_->isPipeliningEnabled()) { - builtinHds.push_back(std::make_pair("Proxy-Connection:", "Keep-Alive")); - } else { - builtinHds.push_back(std::make_pair("Proxy-Connection:", "close")); + builtinHds.push_back(std::make_pair("Connection:", "Keep-Alive")); } } if(proxyRequest_ && !proxyRequest_->getUsername().empty()) { @@ -276,7 +274,6 @@ std::string HttpRequest::createRequest() std::string HttpRequest::createProxyRequest() const { assert(proxyRequest_); - //std::string hostport(fmt("%s:%u", getURIHost().c_str(), getPort())); std::string requestLine(fmt("CONNECT %s:%u HTTP/1.1\r\n" "User-Agent: %s\r\n" "Host: %s:%u\r\n", @@ -285,12 +282,6 @@ std::string HttpRequest::createProxyRequest() const userAgent_.c_str(), getURIHost().c_str(), getPort())); - // TODO Is "Proxy-Connection" needed here? - // if(request->isKeepAliveEnabled() || request->isPipeliningEnabled()) { - // requestLine += "Proxy-Connection: Keep-Alive\r\n"; - // }else { - // requestLine += "Proxy-Connection: close\r\n"; - // } if(!proxyRequest_->getUsername().empty()) { std::pair<std::string, std::string> auth = getProxyAuthString(); requestLine += auth.first; |
