Closed
Bug 120033
Opened 23 years ago
Closed 23 years ago
gzipped file when transfer encoding is gzip.
Categories
(Core Graveyard :: File Handling, defect)
Core Graveyard
File Handling
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: yasuo_ohgaki, Assigned: law)
References
()
Details
From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7+) Gecko/20020111 BuildID: 2002011108 Mozilla saves file as gzipped file when transfer encoding is gzip. Reproducible: Always Steps to Reproduce: 1. Open the URL and locate some patch/file to download 2. Download file 3. execute "file <downloaded-file>" Actual Results: File is gzipped. Expected Results: Decoded text should be saved just like IE does. I'm not saying decode gzipped file, but decode gzip transfer encoding :)
Comment 1•23 years ago
|
||
file handling...?
Assignee: trudelle → law
Component: XP Apps → File Handling
Comment 2•23 years ago
|
||
Yasuo, how are you downloading the file/patch?
Reporter | ||
Comment 3•23 years ago
|
||
If you see this page, you'll see "Download" links at right hand side. http://cvs.php.net/cvs.php/php4/ext/pgsql/pgsql.c
Comment 4•23 years ago
|
||
Confirming. Clicking on the link and then selecting "save" from the resulting dialog does not decode based on the content-encoding. This is distinct from doing right click and then save as, which uses the persistance object....
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
Comment 5•23 years ago
|
||
Note that the gzip is a _content_ encoding, not a _transfer_ encoding. So arguably we should _not_ be unzipping....
Reporter | ||
Comment 6•23 years ago
|
||
Boris, Are you saying the file(content) is actually gzipped? If so, I have to complain about it to horde guys :) They said files are not gzipped. IEs decodes files from cvs.php.net, while gzipped files remain gzipped, though...
Comment 7•23 years ago
|
||
> Are you saying the file(content) is actually gzipped?
I'm saying that servers send the _same_ headers in both cases, unfortunately...
so we have to try to guess whether it's "actually gzipped" or "just
content-encoded"
Reporter | ||
Comment 8•23 years ago
|
||
Then I'll take a look at server settings, actual headers and code when I have time.
Comment 9•23 years ago
|
||
*** Bug 123192 has been marked as a duplicate of this bug. ***
Reporter | ||
Comment 10•23 years ago
|
||
I haven't spent time to take a look at actual packets, yet. I noticed Mozilla decodes zgip/bz2 files in some cases. Try http://snaps.php.net/
Comment 11•23 years ago
|
||
This makes life difficult for me. http://hosted.barrysworld.net/basiliskii/rail/photos.html is where I am usually bitten by it...
Comment 12•23 years ago
|
||
From comments in this bug, it sounds like it's a problem with content-encoding rather than transfer-encoding. Update summary?
Comment 13•23 years ago
|
||
When saving a file Mozilla obviously forgets to parse the received HTTP header for the presence of the "Content-Encoding:" header (and to decode it before saving if necessary) as specified in RFC 2616 section 14.11 (HTTP 1.1) and RFC 1945 section 10.3 (HTTP 1.0). This is also necessary if the file is in the cache and Mozilla is offline! Here are some wget logfiles for http://hosted.barrysworld.net/basiliskii/rail/photos.html: without the accept-content header: ---request begin--- GET /basiliskii/rail/photos.html HTTP/1.0 User-Agent: Wget/1.7 Host: hosted.barrysworld.net Accept: */* Connection: Keep-Alive ---request end--- HTTP request sent, awaiting response... HTTP/1.1 200 OK Date: Sun, 17 Feb 2002 08:26:56 GMT Server: Apache Last-Modified: Thu, 07 Feb 2002 19:43:16 GMT ETag: "3c199-1805-3c62d8d4" Accept-Ranges: bytes Content-Length: 6149 Connection: close Content-Type: text/html Length: 6,149 [text/html] and now with the header: ---request begin--- GET /basiliskii/rail/photos.html HTTP/1.0 User-Agent: Wget/1.7 Host: hosted.barrysworld.net Accept: */* Connection: Keep-Alive Accept-Encoding: gzip, deflate, compress;q=0.9 ---request end--- HTTP request sent, awaiting response... HTTP/1.1 200 OK Date: Sun, 17 Feb 2002 08:27:26 GMT Server: Apache Last-Modified: Thu, 07 Feb 2002 19:43:16 GMT ETag: "3c199-1805-3c62d8d4" Accept-Ranges: bytes Connection: close Content-Type: text/html Content-Encoding: gzip Content-Length: 2057 Length: 2,057 [text/html]
Comment 14•23 years ago
|
||
*** Bug 126007 has been marked as a duplicate of this bug. ***
Comment 15•23 years ago
|
||
> and is only decoded before rendering or analogous usage. It's not clear that saving is analogous usage. The problem with content encoding is that the encoding is an integral part of the data, unlike with transfer encoding. So we _should_ save with the content encoding. Servers often use content encoding when they mean transfer encoding, however. Please see my comments in bug 121001 For example, type application/tar content-encoding gzip should not be decompressed before saving. IE gets this wrong because it always decodes. All that said, I am working on a possible fix.
Comment 16•23 years ago
|
||
fixed by checkin for bug 69306
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•23 years ago
|
QA Contact: sairuh → tever
Comment 17•23 years ago
|
||
*** Bug 127954 has been marked as a duplicate of this bug. ***
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•