dev@glassfish.java.net

Re: REST API and slashes in resource names

From: Ludovic Champenois <ludovic.champenois_at_oracle.com>
Date: Tue, 01 Jun 2010 06:41:32 -0700

On 6/1/10 6:31 AM, Paul Sandoz wrote:
>
> On Jun 1, 2010, at 12:47 PM, Andreas Loew wrote:
>
>> Hi Paul,
>>
>> Paul Sandoz schrieb:
>>
>>>> Not quite: '{' and '}' are just "unsafe" characters,
>>> They are disallowed in the URI syntax:
>>> http://greenbytes.de/tech/webdav/rfc2396.html#rfc.section.2.4.3
>>
>> while I don't want to argue with you about the subtleties of the fact
>> that curly brackets are *not* part of *neither* "reserved" *nor*
>> "unreserved" characters, it seems to me that the following would be
>> fully sanctioned by the spec:
>>
>> .../management/domain/resources/admin-object-resource/(jndi/foo)
>>
>> because "normal" brackets are "unreserved" characters: "Data
>> characters that are allowed in a URI but do not have a reserved
>> purpose are called unreserved."
>>
>
> Yes.
>
>
>> So how about wrapping resource values that contain "reserved"
>> characters by a pair of (unreserved) "normal" brackets '(' and ')'?
>>
>
> It would work, but it is not clear to me if there is any need for
> wrapping. Ludo?
>
> I think that would only be required if further path segments may occur
> after e.g.
>
>
> .../management/domain/resources/admin-object-resource/(jndi/foo)/bar/baz
We currently have this pattern as GlassFish Resources may have sub-paths
(for example, the properties of a resource:
http://localhost:4848/management/domain/resources/jdbc-connection-pool/DerbyPool/property
)

I need to see what is the valid content for a resource name, but I guess
we need wrapping there.
Ludo
>
> It should be possible to use @Path with a regex to capture all the
> path segments between '(' and ')'
>
> Paul.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>