You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Benson Margulies <bi...@gmail.com> on 2011/12/22 03:41:13 UTC

Case-sensitivity on HTTP headers and CORS

http://dvcs.w3.org/hg/cors/raw-file/tip/Overview.html#author-request-headers
demands case-sensitive comparison.

Chrome sends, e.g.:

   Access-Control-Request-Headers: Content-Type

Firefox sends, e.g.

  Access-Control-Request-Headers: content-type

Should we violate the spec and do a case-insensitive comparison?

Re: Case-sensitivity on HTTP headers and CORS

Posted by Benson Margulies <bi...@gmail.com>.
See CXF-3998 instead.

On Thu, Dec 22, 2011 at 4:47 AM, Sergey Beryozkin <sb...@gmail.com> wrote:
> Hi Benson
> On 22/12/11 02:41, Benson Margulies wrote:
>>
>>
>> http://dvcs.w3.org/hg/cors/raw-file/tip/Overview.html#author-request-headers
>> demands case-sensitive comparison.
>>
>> Chrome sends, e.g.:
>>
>>    Access-Control-Request-Headers: Content-Type
>>
>> Firefox sends, e.g.
>>
>>   Access-Control-Request-Headers: content-type
>>
>> Should we violate the spec and do a case-insensitive comparison?
>
>
> In JAX-RS the headers can be retrieved using a case-insensitive comparison,
> ex,
> @Header("content-type") String h
>
> needs to work with Content-Type.
>
> So perhaps we should do a case-insensitive comparison by default and add a
> filter property which can be used to enforce the case-sensitive comparison
>
> Cheers, Sergey

Re: Case-sensitivity on HTTP headers and CORS

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Benson
On 22/12/11 02:41, Benson Margulies wrote:
> http://dvcs.w3.org/hg/cors/raw-file/tip/Overview.html#author-request-headers
> demands case-sensitive comparison.
>
> Chrome sends, e.g.:
>
>     Access-Control-Request-Headers: Content-Type
>
> Firefox sends, e.g.
>
>    Access-Control-Request-Headers: content-type
>
> Should we violate the spec and do a case-insensitive comparison?

In JAX-RS the headers can be retrieved using a case-insensitive 
comparison, ex,
@Header("content-type") String h

needs to work with Content-Type.

So perhaps we should do a case-insensitive comparison by default and add 
a filter property which can be used to enforce the case-sensitive comparison

Cheers, Sergey