-
Bug
-
Resolution: Done
-
Major
-
3.0.10.Final
-
None
This is a follow-up to RESTEASY-1077.
getPath() and getPath(false) are missing the trailing slash, when getAbsolutePath() correctly contains it.
This contradicts the javadoc for getAbsolutePath() saying that it's equivalent to uriInfo.getBaseUri().resolve(uriInfo.getPath(false)).
This breaks code such as:
if (!uriInfo.getPath().endsWith("/")) { // make sure there's a trailing slash (for correct relative URI resolution) return Response .status(Response.Status.MOVED_PERMANENTLY) .location(uriInfo.getBaseUriBuilder().path("/test/").build()) .build(); } …
- is cloned by
-
JBEAP-4698 UriInfo#getPath() is missing trailing slash
- Closed