Closed Bug 228321 Opened 21 years ago Closed 21 years ago

content-encoding: gzip page gets saved gzipped when no extension present in the url

Categories

(Core Graveyard :: File Handling, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.6final

People

(Reporter: Biesinger, Assigned: Biesinger)

References

()

Details

Attachments

(2 files)

quoting bz,
"The problem here is that the change for bug 213877 added a check for the
extension before calling applyDecodingForExtension().  That's bad, since that
code is defaulting to "don't apply" and no extension means that that's what it
will do.

The correct fix is to restore the code to the way it used to be (remove the
check for a non-empty extension). "
this causes, e.g., http://slashdot.org to be saved as a gzip file, not simply as
.html.
Flags: blocking1.6?
Attached patch patchSplinter Review
I suppose we should remove the NS_PRECONDITION(aExtension) in
ApplyDecodingForExtension...
er, actually, I wanted to upload this patch, not the other one...

Anyway, either fixes the bug.
Attachment #137335 - Flags: review?(bz-vacation)
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.6final
Flags: blocking1.6? → blocking1.6+
Slightly more context for comment 0:

L. David Baron wrote:
>[14:59:20] <dbaron> so I just went to http://slashdot.org/
>[14:59:26] <dbaron> and did "File | Save Page"
>[14:59:29] <dbaron> (chose HTML only)
>[14:59:40] <dbaron> and the saved page was a gzip file
>[14:59:45] <dbaron> 1) is that supposed to happen?
                                                                                
No.
                                                                                
>[14:59:48] <dbaron> 2) is that a regression?
                                                                                
Yes.
                                                                                
>[14:59:59] * dbaron assumes it's content-encoding: gzip
                                                                                
Yep.
                                                                                
The problem here is that the change for bug 213877 added a check for the
extension before calling applyDecodingForExtension().  That's bad, since
that code is defaulting to "don't apply" and no extension means that
that's what it will do.
                                                                                
The correct fix is to restore the code to the way it used to be (remove
the check for a non-empty extension).
Comment on attachment 137335 [details] [diff] [review]
alternative patch

We want this one.  If we can't get an exthandler here, it's better to leave
slashdot gzipped than to decompress .tar.gz files...

I don't think the assert needs removing, since this should be passing "", not
null.
Attachment #137335 - Flags: review?(bz-vacation) → review+
Comment on attachment 137335 [details] [diff] [review]
alternative patch

darin: this is a very short patch, and would be nice to get for 1.6.
Attachment #137335 - Flags: superreview?(darin)
*** Bug 228472 has been marked as a duplicate of this bug. ***
Can we remove the "with no extension present" from the summary since my
duplicate displayed this problem even when the file name to save was specified
with an extension?
err, really? what was the exact url?
https://www.attwireless.com/ocs/billing/eBills/AWSUser?[long query string]

I was not aware that you meant no extension in the URL. I read that as no
extension in the saved file name.
ah, sorry for not making that clear.
Summary: content-encoding: gzip page gets saved gzipped when no extension present → content-encoding: gzip page gets saved gzipped when no extension present in the url
Comment on attachment 137335 [details] [diff] [review]
alternative patch

sr=darin
Attachment #137335 - Flags: superreview?(darin) → superreview+
Comment on attachment 137335 [details] [diff] [review]
alternative patch

fixes the problem that some html pages (which the server sent gzipped) were not
ungzipped during download, low risk.
Attachment #137335 - Flags: approval1.6?
Comment on attachment 137335 [details] [diff] [review]
alternative patch

a=chofmann for 1.6
Attachment #137335 - Flags: approval1.6? → approval1.6+
Checking in resources/content/contentAreaUtils.js;
/cvsroot/mozilla/xpfe/communicator/resources/content/contentAreaUtils.js,v  <--
 contentAreaUtils.js
new revision: 1.99; previous revision: 1.98
done
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
*** Bug 229158 has been marked as a duplicate of this bug. ***
*** Bug 229287 has been marked as a duplicate of this bug. ***
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: