Fix url determination
This commit is contained in:
parent
1f0f9176fe
commit
5701572e08
|
@ -46,15 +46,23 @@ public class IncomingRequestAddressStrategy implements IServerAddressStrategy {
|
||||||
requestPath = requestPath.substring(1);
|
requestPath = requestPath.substring(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int startOfPath = requestUrl.indexOf("//");
|
||||||
|
if (startOfPath != -1 && (startOfPath + 2) < requestUrl.length()) {
|
||||||
|
startOfPath = requestUrl.indexOf("/", startOfPath + 2);
|
||||||
|
}
|
||||||
|
if (startOfPath == -1) {
|
||||||
|
startOfPath = 0;
|
||||||
|
}
|
||||||
|
|
||||||
int contextIndex;
|
int contextIndex;
|
||||||
if (servletPath.length() == 0) {
|
if (servletPath.length() == 0) {
|
||||||
if (requestPath.length() == 0) {
|
if (requestPath.length() == 0) {
|
||||||
contextIndex = requestUrl.length();
|
contextIndex = requestUrl.length();
|
||||||
} else {
|
} else {
|
||||||
contextIndex = requestUrl.indexOf(requestPath);
|
contextIndex = requestUrl.indexOf(requestPath, startOfPath);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
contextIndex = requestUrl.indexOf(servletPath);
|
contextIndex = requestUrl.indexOf(servletPath, startOfPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
String fhirServerBase;
|
String fhirServerBase;
|
||||||
|
|
Loading…
Reference in New Issue