mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-25 12:08:00 +01:00
[bosh] Allow for file to be 'null'
This commit is contained in:
parent
6eb1004d38
commit
e768bc8bfb
1 changed files with 8 additions and 4 deletions
|
@ -47,10 +47,14 @@ public final class BOSHConfiguration extends ConnectionConfiguration {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
https = builder.https;
|
https = builder.https;
|
||||||
if (builder.file.charAt(0) != '/') {
|
if (builder.file != null) {
|
||||||
file = '/' + builder.file;
|
if (builder.file.charAt(0) != '/') {
|
||||||
|
file = '/' + builder.file;
|
||||||
|
} else {
|
||||||
|
file = builder.file;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
file = builder.file;
|
file = null;
|
||||||
}
|
}
|
||||||
httpHeaders = builder.httpHeaders;
|
httpHeaders = builder.httpHeaders;
|
||||||
}
|
}
|
||||||
|
@ -77,7 +81,7 @@ public final class BOSHConfiguration extends ConnectionConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
public URI getURI() throws URISyntaxException {
|
public URI getURI() throws URISyntaxException {
|
||||||
String uri = (https ? "https://" : "http://") + getHostString() + ":" + this.port + file;
|
String uri = (https ? "https://" : "http://") + getHostString() + ":" + this.port + (file != null ? file : "");
|
||||||
return new URI(uri);
|
return new URI(uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue