Welcome! Log In Create A New Profile

Advanced

Re: content-type header charset info problem

Maxim Dounin
May 10, 2012 02:36PM
Hello!

On Thu, May 10, 2012 at 11:51:01AM -0400, djeps wrote:

> Hello,
>
> I'm trying to add "charset=utf-8" to the Content-Type header.
>
> When I don't use "Accept-Encoding:gzip, deflate", all is fine.
>
> When I add the above request header, the response header excludes the
> charset info from the Content-Type header.
>
> I thoroughly read the documentation and it's not clear if it's by design
> nor why I can't have both charset info into Content-Type and "Vary:
> Accept-Encoding, User-Agent" response headers.
>
> $ curl -s -D- -o/dev/null -H"Host:www.stripped.com" http://localhost/
> HTTP/1.1 200 OK
> Date: Thu, 10 May 2012 15:48:36 GMT
> Content-Type: text/html; charset=utf-8
> Connection: close
> Server: mycacheserver 1.3.2
> Last-Modified: Thu, 10 May 2012 15:45:56 GMT
> Cache-Control: public, max-age=60
> ETag: 21adca4e3bc9e6517b61d7385c2536c7
> Expires: Thu, 10 May 2012 15:49:36 GMT
> Vary: Accept-Encoding, User-Agent
> Content-Length: 222581
>
> $ curl -s -D- -o/dev/null -H "Accept-Encoding:gzip, deflate"
> -H"Host:www.stripped.com http://localhost/
> HTTP/1.1 200 OK
> Date: Thu, 10 May 2012 15:33:10 GMT
> Content-Type: text/html
> Connection: close
> Server: mycacheserver 1.3.2
> Last-Modified: Thu, 10 May 2012 15:32:53 GMT
> Cache-Control: public, max-age=60
> ETag: 7dcd476ac501f1929f2ad8efd1731f6
> Expires: Thu, 10 May 2012 15:34:10 GMT
> Vary: Accept-Encoding, User-Agent
> Content-Encoding: gzip
> Content-Length: 39914
>
> Any thougths?

This doesn't looks like nginx is responsible for gzipping here
(note: Content-Length header present in gzipped response, which
might happen only with gzip_static, but ETag presense excludes
it). So it's likely the problem is somewhere outside of nginx (if
it's involved at all).

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

content-type header charset info problem

djeps May 10, 2012 11:51AM

Re: content-type header charset info problem

Maxim Dounin May 10, 2012 02:36PM

Re: content-type header charset info problem

djeps May 10, 2012 04:36PM

Re: content-type header charset info problem

Maxim Dounin May 11, 2012 03:12AM

Re: content-type header charset info problem

djeps May 11, 2012 10:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 157
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready