Welcome! Log In Create A New Profile

Advanced

content-type header charset info problem

May 10, 2012 11:51AM
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!
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: 105
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready