mirror of
https://github.com/hapifhir/hapi-fhir.git
synced 2025-02-18 10:55:22 +00:00
If servletContextPath is not root (application is deployed not to the root) we should take it into consideration while determinating server base.
This commit is contained in:
parent
e73f409800
commit
0e3bb5a797
@ -73,7 +73,12 @@ public class IncomingRequestAddressStrategy implements IServerAddressStrategy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String fhirServerBase;
|
String fhirServerBase;
|
||||||
int length = contextIndex + servletPath.length();
|
int length;
|
||||||
|
if (servletContextPath.length() == 0 || servletContextPath.equals("/")) {
|
||||||
|
length = contextIndex + servletPath.length();
|
||||||
|
} else {
|
||||||
|
length = contextIndex + servletPath.length() + servletContextPath.length();
|
||||||
|
}
|
||||||
if (length > requestUrlLength) {
|
if (length > requestUrlLength) {
|
||||||
length = requestUrlLength;
|
length = requestUrlLength;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user