mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-12-22 20:47:57 +01:00
Merge branch '4.3'
This commit is contained in:
commit
a23adfab6e
2 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue