Do not use "CONNECT" in the Host header field.

This commit is contained in:
Oliver Mihatsch 2019-03-18 10:34:49 +01:00 committed by Florian Schmaus
parent 653d9dbba7
commit 3450ffad2b
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ class HTTPProxySocketConnection implements ProxySocketConnection {
proxyLine = "\r\nProxy-Authorization: Basic " + Base64.encode(username + ":" + password);
}
socket.getOutputStream().write((hostport + " HTTP/1.1\r\nHost: "
+ hostport + proxyLine + "\r\n\r\n").getBytes("UTF-8"));
+ host + ":" + port + proxyLine + "\r\n\r\n").getBytes("UTF-8"));
InputStream in = socket.getInputStream();
StringBuilder got = new StringBuilder(100);