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

[jsr339-experts] Re: Allow header in (Request)HttpHeaders

From: Bill Burke <bburke_at_redhat.com>
Date: Fri, 16 Dec 2011 09:22:10 -0500

On 12/16/11 9:05 AM, Sergey Beryozkin wrote:

>> It seems to me that Allow would be rarely (99% never) be used by either
>> the client or server(prolly never on the server as JAX-RS will
>> automatically do this for you).
>
> Allow is supposed to be included in the response to OPTIONS
>

Yes, I know, its included automatically in the default OPTION response
required by the spec. Also, IIRC, it is automatically generated and
passed back by the JAX-RS runtime on 405 (method not allowed) errors.
So, at least on the server side any allow() method in ResponseBuilder
will never be used.

On the client side, how often do you think people are going to use the
request semantics of Allow? Never I'd say. There are a few other
headers in HTTP that don't have special methods in the JAX-RS 1 and 2
specs. Either these esoteric headers should also have special methods
in Request, Response, and their respective builders, or esoteric, little
used methods like allow() should be removed from.

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com