users@jsr311.java.net

Re: remove double slashes from URI?

From: Marc Hadley <marc.hadley_at_oracle.com>
Date: Tue, 13 Apr 2010 12:44:58 -0400

On Apr 13, 2010, at 12:06 PM, André Dietisheim wrote:
>
> thanks for answering!
> If I read you right, the jax-rs do not impose this normalisation. It's just a matter of taste, right?
>
That kind of normalization doesn't seem to be required by any of the RFCs, its a Jersey extension.

Marc.

> Thanks in advance
> André
>
> On 04/13/2010 06:00 PM, Marc Hadley wrote:
>> On Apr 13, 2010, at 11:32 AM, André Dietisheim wrote:
>>
>>> > > we currently use jax-rs in our product and I came across the pretty frequent case where I expected an URI with double slashes to be equivalent to an URI with a single slash
>>> > > ex.
>>> > http://mydomain/resource
>>> > http://mydomain//resource
>>> > > Jersey currently does not treat both URI to be equivalent.
>>> > Reading the jax-rs specs I got redirected to RFC3986 (http://www.ietf.org/rfc/rfc3986.txt). I tend to pretend that URI normalization (specially section 6.2.3) is to be read that // may be normalized to /.
>>> > I'd highly appreciate any inputs, corrections to this topic.
>>> >
>> Jersey supports an optional feature (FEATURE_CANONICALIZE_URI_PATH) that you can set in your ResourceConfig to control this.
>>
>> Marc.
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: users-help_at_jsr311.dev.java.net
>