Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Don't mangle files that start with the gzip magic bytes. #1307
From mod-pagespeed-discuss thread: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/mod-pagespeed-discuss/nehDfeYxlTQ/NKWKLLFPCAAJ
A site is using the GD Star Rating plugin, and the CSS for that plugin gets garbled by mod_pagespeed. I suspect this is because the plugin gzips its CSS output but does not give it content-encoding:gzip header. So mod_pagespeed attempts to parse the gzip output as plain CSS and reports lots of encoding warnings.
The output is also broken -- the CSS coming out of mod_pagespeed is not readable.
I think this is the fault of the plugin, but I can't prove it because the download link for the plugin is broken: http://www.gdstarrating.com/index.html . The customer is using GD Star 1.9.22.
As far as I can tell from that site, that whole gd-star system has not had an update in 5 years. However, the problem is avoided by telling mod_pagespeed not to touch it:
A gzipped resource should start with the magic bytes
We should be aware of this, and avoid touching anything that starts with that. Maybe we should be like browsers and treat it as telling us that we're processing gzipped data if it then gunzips without errors, but we definitely shouldn't proceed as if it's text.