Content-Type with charset

SplitIce mat999 at gmail.com
Tue Oct 26 12:10:52 MSD 2010


Ive seen other applications drop the quotes too maybe nginx should be less
strict?

On Tue, Oct 26, 2010 at 7:01 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:

> Hello!
>
> On Mon, Oct 25, 2010 at 05:31:35PM -0700, Matthieu Tourne wrote:
>
> > Hello,
> >
> > I have a case where the origin server behind nginx returns this header:
> > Content-Type: application/javascript; charset: UTF-8
> >
> > Which seems to be valid according for HTTP/1.0 [1] and HTTP/1.1 [2] rfcs.
>
> This doesn't looks valid.  Valid one will look like
>
> Content-Type: application/javascript; charset=UTF-8
>
> Parameters should be in form 'attribute "=" value, see here:
>
> http://tools.ietf.org/html/rfc2616#section-3.7
> http://tools.ietf.org/html/rfc2616#section-3.6
>
> > I have gzip_types set to application/javascript, but the added charset
> > part seems to throw off ngx_http_test_content_type()
> >
> > This simple patch included below seems to fix it, but it's not exactly
> > production ready.
> >
> > Is there another way to make this work ?
>
> Valid charset specifications should work as is.  Other parameters
> will confuse content type testing, but this isn't believed to be
> widely used.
>
> Maxim Dounin
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>



-- 
Warez Scene <http://thewarezscene.org> Free Rapidshare
Downloads<http://www.nexusddl.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20101026/ca222b0f/attachment.html>


More information about the nginx mailing list