users@jsr311.java.net

Re: Case-insensitive query parameters

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 02 Feb 2010 13:29:21 +0100

On Feb 2, 2010, at 11:08 AM, Sergey Beryozkin wrote:

> Hi
>
> Can UriInfo.getQueryParameters return a case-insensitive
> MultivaluedMap, similarly to the way HttpHeaders.getRequestHeaders
> does ?

No.


> Or is it how it should already work ?
>

Query parameter names are not specified to be case insensitive like
header parameter names.

So if you need case-insensitive look up you will need either:

1) to wrap MultivaluedMap instance returned from UriInfo around some
additional functionality; or

2) normalize the query string, in a filter say, lower casing the
parameter names.

Paul.