Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- ob gzhandler() not setting "Vary: Accept-encoding" when uncompressed


badbadmonkey - 4:04 am on Aug 11, 2011 (gmt 0)


I am using ob_gzhandler() to dynamically handle GZIP compression on a server which doesn't allow it done by htaccess.

It adds "Accept-encoding" to the Vary: header, as it should, when the body is Gzipped.

However when the client sends no Accept-Encoding: header, and the response is accordingly uncompressed, it does not add this Vary header.

This causes various bug checking tools to complain, and could mess up caching.

I know I can manually add Vary: Accept-encoding, and I am, but is that my only solution - just confirming this is a bug and I'm not missing something?


Thread source:: http://www.webmasterworld.com/php/4350206.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com