reta commented on a change in pull request #630: CXF-8201 add additional check
for file scheme in setUriParts
URL: https://github.com/apache/cxf/pull/630#discussion_r370911966
##########
File path:
rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
##########
@@ -651,8 +651,8 @@ private void setUriParts(URI uri) {
} else {
schemeSpecificPart = uri.getSchemeSpecificPart();
}
- if (scheme != null && host == null && (query == null ||
query.isEmpty()) && userInfo == null
- && uri.getSchemeSpecificPart() != null) {
+ if (scheme != null && !"file".equalsIgnoreCase(scheme) && host == null
&& (query == null || query.isEmpty())
Review comment:
Hi @jgallimore, thanks for the PR. I think CXF should not assume any
intrinsic knowledge about the URI scheme and handle it in a specific way. For
example, what about handling `jar:file`? Or any other custom schemes?
Although the reply on spec list
(https://www.eclipse.org/lists/jaxrs-dev/msg00774.html) explicitly mentions
that JAX-RS context is REST-over-HTTP (the CXF case), we could certainly make
`UriBuilder` more flexible if the general solution could be found.
Hope it makes sense, thank you.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services