[jax-rs-spec users] [jsr339-experts] Re: Allow header in (Request)HttpHeaders

From: Sergey Beryozkin <>
Date: Fri, 16 Dec 2011 10:17:40 +0000

>>>> by the way, getAllowMethods() - is is supposed to be on the ResponseHeaders instead ?
>>> As an expert homework, kindly search through the HTTP spec or browse through this EG mailing list archive to find the
>>> answer and come back with it ;)
>> Yes I checked. Are you using this "MAY" bit: "The Allow header field MAY be provided with a PUT request to recommend
>> the methods to be supported by the new or modified resource.". Does it deserve a dedicated method ? What is your
>> target audience ? What do you expect the JAX-RS server implementation do ? We have 4 major HTTP verbs, that MAY thing
>> talks about 1 verb, see what I mean ?
> No I don't. Do you want me to remove the method, because the HTTP spec does say the Allow is a mandatory request header?
> Allow is a general-purpose header. It surely is more frequent in the response, but if we have it in the response, we
> should also have it on the request, as it is a general-purpose header.

My reading of

tells me that it's supposed to be used by the server to advertise the
methods a given resource supports;

Please keep it in - if you know why promoting it at the request
interface level can help JAX-RS developers; all other 'promoted'
headers can be useful (Accept, Content-Type, Content-Length,
I'd rather consider adding an Origin or Range helpers