mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-19 02:22:05 +01:00
Merge branch '4.4'
This commit is contained in:
commit
e51bfb1dbe
2 changed files with 12 additions and 1 deletions
|
@ -77,7 +77,8 @@ public final class BOSHConfiguration extends ConnectionConfiguration {
|
|||
}
|
||||
|
||||
public URI getURI() throws URISyntaxException {
|
||||
return new URI((https ? "https://" : "http://") + this.host + ":" + this.port + file);
|
||||
String uri = https ? "https://" : "http://" + getHostString() + ":" + this.port + file;
|
||||
return new URI(uri);
|
||||
}
|
||||
|
||||
public Map<String, String> getHttpHeaders() {
|
||||
|
|
|
@ -302,6 +302,16 @@ public abstract class ConnectionConfiguration {
|
|||
return new SmackTlsContext(context, daneVerifier);
|
||||
}
|
||||
|
||||
public String getHostString() {
|
||||
if (hostAddress != null) {
|
||||
return hostAddress.toString();
|
||||
}
|
||||
if (host != null) {
|
||||
return host.toString();
|
||||
}
|
||||
return xmppServiceDomain.toString();
|
||||
}
|
||||
|
||||
public DnsName getHost() {
|
||||
return host;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue