1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 03:52:06 +01:00

Merge branch '4.3'

This commit is contained in:
Florian Schmaus 2019-03-24 00:16:24 +01:00
commit a23adfab6e
2 changed files with 4 additions and 2 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);
@ -115,7 +115,8 @@ class HTTPProxySocketConnection implements ProxySocketConnection {
int code = Integer.parseInt(m.group(1));
if (code != HttpURLConnection.HTTP_OK) {
throw new ProxyException(ProxyInfo.ProxyType.HTTP);
throw new ProxyException(ProxyInfo.ProxyType.HTTP,
"Error code in proxy response: " + code);
}
}

View file

@ -609,6 +609,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
proxyInfo.getProxySocketConnection().connect(socket, host, port, timeout);
} catch (IOException e) {
hostAddress.setException(e);
failedAddresses.add(hostAddress);
continue;
}
LOGGER.finer("Established TCP connection to " + hostAndPort);