Bug 9521
Summary: | Safari fails to load Gzip compressed JavaScript or CSS | ||
---|---|---|---|
Product: | WebKit | Reporter: | Eric Seidel (no email) <eric> |
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | ap, cgriego, ddkilzer, ian, jp, kirksemail |
Priority: | P4 | Keywords: | InRadar |
Version: | 420+ | ||
Hardware: | Mac | ||
OS: | OS X 10.4 | ||
URL: | http://pdatabase.dyndns.biz/baldness.js.gz | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=178941 |
Eric Seidel (no email)
http://pdatabase.dyndns.biz/baldness.js.gz
$ curl -I http://pdatabase.dyndns.biz/baldness.js.gz
HTTP/1.1 200 OK
Date: Wed, 21 Jun 2006 06:12:38 GMT
Server: Apache/1.3.34 (Unix) PHP/4.3.10
Last-Modified: Thu, 25 May 2006 21:21:18 GMT
ETag: "4e4645-cf2a-44761fce"
Accept-Ranges: bytes
Content-Length: 53034
Content-Type: application/x-javascript
Content-Encoding: x-gzip
It looks to be sent correctly. But Safari fails to load it.
It's used by:
http://pdatabase.dyndns.biz/test16.php
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
The network layer doesn't ask for x-gzip, but the server still sends it:
Accept-Encoding: gzip, deflate
Alexey Proskuryakov
Strange, the previous comment didn't get through in its entirety :-O
...So, I think this is a server bug, and also probably a CFNetwork limitation.
Kirk Cerny
Safari will not load my javascript or my css when it is gziped.
The headers are correct, the file name seems to be the issue.
If the file has a .gz extension it will not be rendered.
If I use the apache module mod_gzip the css gets gzipped but it does not add the .gz extension, and safari renders the css.
The headers in both cases are exactly the same except for the file name.
Content-Type text/css
Content-Encoding gzip
Alexey Proskuryakov
(In reply to comment #3)
> Safari will not load my javascript or my css when it is gziped.
Could you please provide an URL to a test case?
David Kilzer (:ddkilzer)
Does this technique work in Firefox 2.0.0.x? Opera 9.2x? MSIE 6/7?
Kirk Cerny
(In reply to comment #5)
> Does this technique work in Firefox 2.0.0.x? Opera 9.2x? MSIE 6/7?
>
Yes, the .gz extension works in Firefox 2.0.0.x Opera 9.2x MSIE 6/7
Kirk Cerny
(In reply to comment #4)
> (In reply to comment #3)
> > Safari will not load my javascript or my css when it is gziped.
>
> Could you please provide an URL to a test case?
>
http://kirk.galaxytechsolutions.com
David Kilzer (:ddkilzer)
<rdar://problem/5418646>
Joost P. Vermeer
Quote of HTTP spec:
RFC 2616 - Hypertext Transfer Protocol
3.5 Content Codings
Use of program names for the identification of encoding formats
is not desirable and is discouraged for future encodings. Their
use here is representative of historical practice, not good
design. For compatibility with previous implementations of HTTP,
applications SHOULD consider "x-gzip" and "x-compress" to be
equivalent to "gzip" and "compress" respectively.
David Kilzer (:ddkilzer)
Marking bug RESOLVED/INVALID since this is not a WebKit bug.
The issue will be tracked internally through the Radar bug. Thanks!