SSLEepGet: Send Host header to HTTPS proxy

ref: RFC 2617 sec. 5.2
This commit is contained in:
zzz
2022-05-30 10:39:38 -04:00
parent ef08dfad55
commit 3acc4b754a

View File

@@ -957,7 +957,8 @@ public class SSLEepGet extends EepGet {
_proxyIn = _proxy.getInputStream();
_proxyOut = _proxy.getOutputStream();
StringBuilder buf = new StringBuilder(64);
buf.append("CONNECT ").append(host).append(':').append(port).append(" HTTP/1.1\r\n");
buf.append("CONNECT ").append(host).append(':').append(port).append(" HTTP/1.1\r\n" +
"Host: ").append(host).append(':').append(port).append("\r\n");
// TODO if we need extra headers to the proxy, add a new method and list.
// Standard extra headers go the server, not the proxy
//if (_extraPHeaders != null) {