summaryrefslogtreecommitdiff
path: root/methods/http.cc
diff options
context:
space:
mode:
Diffstat (limited to 'methods/http.cc')
-rw-r--r--methods/http.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/methods/http.cc b/methods/http.cc
index d3e16bba3..a4d187189 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -320,14 +320,14 @@ static ResultState UnwrapHTTPConnect(std::string Host, int Port, URI Proxy, std:
std::string ProperHost;
if (Host.find(':') != std::string::npos)
- ProperHost = '[' + Proxy.Host + ']';
+ ProperHost = '[' + Host + ']';
else
- ProperHost = Proxy.Host;
+ ProperHost = Host;
// Build the connect
Req << "CONNECT " << Host << ":" << std::to_string(Port) << " HTTP/1.1\r\n";
if (Proxy.Port != 0)
- Req << "Host: " << ProperHost << ":" << std::to_string(Proxy.Port) << "\r\n";
+ Req << "Host: " << ProperHost << ":" << std::to_string(Port) << "\r\n";
else
Req << "Host: " << ProperHost << "\r\n";