Bug 32268
| Summary: | Webkit discards compressed javascript with .gz extension | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Stephan <stephan.steynfaardt> |
| Component: | Page Loading | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | ap |
| Priority: | P2 | Keywords: | InRadar |
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
| URL: | http://media.streamads.com/development/chromeJS/chromeJS.html | ||
Stephan
Safari can't read or interpret compressed Javascript.
It simply just ignore's the file.
the url below shows that it reads all other implementations of JS, but ignores the compressed JS:
http://media.streamads.com/development/chromeJS/chromeJS.html
Tested it on other browsers safari is the only one that seems to have this issue.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
Confirmed with Mac OS X 10.6.
Just like in bug 32262, this is caused by an extension that the resource has. It's named compressedScript.js.gz, which is basically a lie - it's not a .gz file, it's JavaScript source. The fact that it's gzip-encoded for transmission is a transparent HTTP detail (it may as well choose to use another encoding method).
Regardless, Safari should behave like other browsers do. A workaround is to use a correct name for the external script.
The decision to change the content type based on extension is made by a system
library below WebKit. Closing as INVALID per our policy, as this is not a
WebKit bug.
Would you be willing to report this to Apple via <http://bugreport.apple.com>
(free registration required)? I think that it's not right to change reported
content type due to file extension without at least attempting content
sniffing, but developers working on this code may have better perspective on
the reasons for such behavior.
Alexey Proskuryakov
<rdar://problem/7455943>