jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: [jax-rs-spec users] Support for case-insensitive URI parameters ?

From: Santiago Pericas-Geertsen <Santiago.PericasGeertsen_at_oracle.com>
Date: Fri, 4 Oct 2013 09:51:15 -0400

Sergey,

 The HTTP RFC clearly states that header field names are case insensitive. It also has a section about URI comparison, where it says that, modulo some exceptions [1], URI comparison is case sensitive. Unlikely as it may be, someone could have built a system where both "foo" and "FOO" are used as matrix params, right?

-- Santiago

[1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.2.3

On Oct 4, 2013, at 9:24 AM, Sergey Beryozkin <sberyozkin_at_talend.com> wrote:

> Hi
>
> I've got a question from my colleague re supporting case insensitive URI parameters.
>
> I don't see anything in the API regarding it so I assume it is all case-sensitive (PathParam, QueryParam, and MatrixParam), except for HeaderParam.
>
> I guess it is technically correct. But IMHO it makes sense to relax it at least for QueryParam and MatrixParam given that they do not affect the matching algorithm, and would simplify it all for the code dealing with the query/matrix params. At the very list this may be can be done optionally, example, UriInfo can have getters for query and matrix param maps with a 'case-sensitive' flag
>
> Will I open a minor enhancement request ?
>
> Thanks, Sergey
>
>
>
>
>