users@jersey.java.net

[Jersey] JERSEY-2469

From: Ezequiel Mario <ezequielballesi_at_gmail.com>
Date: Thu, 3 Apr 2014 11:52:01 -0300

Hi all!,

I encountered an issue on UriBuilder implementation of jersey; it seems
that is not following the spec for query parameter encoding as in
https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/core/UriBuilder.html
.

Query parameters need to be encoded using "*the rules of the
application/x-www-form-urlencoded media type*"; but it seems that the
implementation is following the less strict encoding as defined in RFC
3986 : 3.4. Query; that allows more chars as part of a query param.

I believe that the UriBuilder spec has a stricter encoding for query param
due to some browser erroneous implementation;
*"The characters slash ("/") and question mark ("?") may represent data*
*within the query component. Beware that some older, erroneous*
*implementations may not handle such data correctly when it is used as*
*the base URI for relative references (Section 5.1), apparently*
*because they fail to distinguish query data from path data when*
*looking for hierarchical separators."*

I filled an issue for this since I did not find one exactly as this one (
https://java.net/jira/browse/JERSEY-2469).
Also I have a fix ready; and I can send a pull request.

Any comments will be appreciated!
(Either if you feel this is a real issue or not)

Keep on the excellent work!

Regards,
Ezequiel.