You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Encoding of URI template values
The specification requires both implementations of build() to fully encode the string values of template parameters so that they can be correctly re-parsed as valid URIs, e.g. UriBuilder.fromPath("/{p0}").build("aa{") should build the URI /aa%7B, substituting { with the escaped equivalent %7B. In everrest's implementation this requirement is broken and the builder substitutes the values without escaping, leading to URI syntax failures:
--> UriBuilder.fromPath("/{p1}").build("aa{");
javax.ws.rs.core.UriBuilderException: java.net.URISyntaxException: Illegal character in path at index 3: /aa{
at org.everrest.core.impl.uri.UriBuilderImpl.build(UriBuilderImpl.java:126)
...
Caused by: java.net.URISyntaxException: Illegal character in path at index 3: /aa{
at java.net.URI$Parser.fail(URI.java:2848)
at java.net.URI$Parser.checkChars(URI.java:3021)
at java.net.URI$Parser.parseHierarchical(URI.java:3105)
at java.net.URI$Parser.parse(URI.java:3063)
at java.net.URI.<init>(URI.java:588)
at org.everrest.core.impl.uri.UriBuilderImpl.build(UriBuilderImpl.java:124)
...
Implementation of build(Object...,boolean)
The overload build(Object[],boolean) , which allows customizing whether / is escaped in the parameter values, is not implemented in everrest and returns null.
The current implementation of UriBuilder is lacking and fails on several cases if the target environment has everrest is the available JAX-RS runtime, e.g. Eclipse Che environment.
The text was updated successfully, but these errors were encountered:
Hi,
This issue relates to everrest's implementation of
javax.ws.rs.core.UriBuilder
, specifically the methodsbuild(Object...)
andbuild(Object..., boolean)
. The issue is based on the standard java specification forUriBuilder.build()
:https://docs.oracle.com/javaee/7/api/javax/ws/rs/core/UriBuilder.html#build-java.lang.Object:A-boolean-
Encoding of URI template values
The specification requires both implementations of
build()
to fully encode the string values of template parameters so that they can be correctly re-parsed as valid URIs, e.g.UriBuilder.fromPath("/{p0}").build("aa{")
should build the URI/aa%7B
, substituting{
with the escaped equivalent%7B
. In everrest's implementation this requirement is broken and the builder substitutes the values without escaping, leading to URI syntax failures:Implementation of
build(Object...,boolean)
The overload
build(Object[],boolean)
, which allows customizing whether/
is escaped in the parameter values, is not implemented in everrest and returnsnull
.The current implementation of UriBuilder is lacking and fails on several cases if the target environment has everrest is the available JAX-RS runtime, e.g. Eclipse Che environment.
The text was updated successfully, but these errors were encountered: