1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-22 14:22:05 +01:00

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

View file

@ -58,7 +58,7 @@ class HTTPProxySocketConnection implements ProxySocketConnection {
proxyLine = "\r\nProxy-Authorization: Basic " + Base64.encode(username + ":" + password); proxyLine = "\r\nProxy-Authorization: Basic " + Base64.encode(username + ":" + password);
} }
socket.getOutputStream().write((hostport + " HTTP/1.1\r\nHost: " 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(); InputStream in = socket.getInputStream();
StringBuilder got = new StringBuilder(100); StringBuilder got = new StringBuilder(100);