users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: What is conclusion to matching algorithm issues?

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Tue, 21 May 2013 18:48:23 +0200

On May 21, 2013, at 6:36 PM, Bill Burke <bburke_at_redhat.com> wrote:

> On 5/21/2013 12:28 PM, Sergey Beryozkin wrote:
>> On 21/05/13 17:24, Marek Potociar wrote:
>>> Sergey, you are right - I failed to notice that the POST method does
>>> not have the same literal path value as the SRL method. I apologise.
>>>
>> No problems Marek at all, how many times I've argued my point without
>> reading the responses properly :-). And in this case we have a fairly
>> deep thread :-)
>>
>
> I'm lost myself...What is the conclusion? Do locators match in these situations?

Here's my understanding:

>
> Requests:
> GET /sub

No. The (fixed) algorithm, compliant with JAX-RS 1.1, will match the POST method and fail in step 3.

> OPTIONS /sub

No. The matched POST method will cause that OPTIONS is not found in step 3 and the default OPTIONS response is provided by runtime

> HEAD /sub

No. The matched POST method will cause that neither HEAD nor GET is not found in step 3 and the request should fail with 405

Marek

>
> @Path("/")
> public class Resource {
>
> @Path("sub")
> @POST
> public void post();
>
>
> @Path("{ID}")
> public Locator locator;
> }
>
>
> class Locator {
>
> @GET get();
> @OPTIONS options();
> @HEAD head();
>
> }
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com