Closed Bug 85887 Opened 23 years ago Closed 23 years ago

Gzip content not properly displayed when using Content-Encoding: x-gzip

Categories

(Core :: Networking: HTTP, defect, P2)

x86
All
defect

Tracking

()

VERIFIED FIXED
mozilla0.9.2

People

(Reporter: wolruf, Assigned: darin.moz)

References

()

Details

Attachments

(2 files)

Mozilla: 20010613 OS: Win2k SP1 Steps to reproduce: Load URL: http://cvsweb.netbsd.org/ Result: garbage Expected result: normal HTML page with links, etc. Perhaps gzip is broken or recently broke ? Sniffer shows these headers sent to the browser: [...] Content-Encoding: x-gzip\r\n Vary: Accept-Encoding: x-gzip\r\n [...]
This is an antidup of bug 35956. I believe that the fix for that bug broke this.
The component should be Networking HTTP. I lack the power to change it.
Changing component to Networking HTTP
Component: Browser-General → Networking: HTTP
Assignee: asa → neeti
QA Contact: doronr → benc
really moving
The problem here is that the server says Content-Encoding: x-gzip after mozilla said Accept-Encoding: gzip,deflate,compress,identity While the HTTP 1.1 spec says 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.
-> darin
Assignee: neeti → darin
Status: UNCONFIRMED → NEW
Ever confirmed: true
The following will fix it but is almost certainly the wrong way. It works with this change. diff -u -r1.21 nsHttpChannel.cpp --- nsHttpChannel.cpp 2001/06/13 22:44:46 1.21 +++ nsHttpChannel.cpp 2001/06/14 18:36:58 @@ -338,6 +338,7 @@ } const char *val = mResponseHead->PeekHeader(nsHttp::Content_Encoding); + if (val && ((0==PL_strcasecmp(val,"x-gzip"))||(0==PL_strcasecmp(val,"x-compress")))) val+=2; if (val && PL_strcasestr(nsHttpHandler::get()->AcceptEncodings(), val)) { nsCOMPtr<nsIStreamConverterService> serv; nsresult rv = nsHttpHandler::get()->
David: right, we need to do something like that. I'd like to simply add a method to nsHttpHandler that checks for a valid encoding.
Severity: normal → major
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla0.9.2
Keywords: patch
r=bbaetz
Seeing this on Linux; chaning OS to All.
OS: Windows 2000 → All
I want this. (s)r=me.
*** Bug 86500 has been marked as a duplicate of this bug. ***
a= asa@mozilla.org for checkin to the trunk. (on behalf of drivers)
Blocks: 83989
fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
VERIFIED June 22 morning CVS build on linux
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: