content-type header charset info problem
djeps
nginx-forum at nginx.us
Thu May 10 15:51:01 UTC 2012
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?
Thanks!
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,226248,226248#msg-226248
More information about the nginx
mailing list