Open Bug 648706 Opened 13 years ago Updated 2 years ago

Binary served as text/plain is not detected as binary when content-encoding:gzip is used

Categories

(Firefox :: File Handling, defect)

x86
Windows XP
defect

Tracking

()

REOPENED

People

(Reporter: fehe, Unassigned)

References

()

Details

Attachments

(1 file)

When trying to download Avery DesignPro, Firefox instead loads the binary in the browser.  Every other major browser handles the file properly.

STR:

1. Visit http://www.avery.com/avery/en_us/Templates-&-Software/Software/Avery-DesignPro-for-PC.htm
2. Click the blue "Free Download" button
3. Fill out the form and click "Submit"

Result: Firefox loads the binary in the browser.
http://www.avery.com/vgnfiles//OP/en_us/Static%20Files/Software/DPSetup.exe

Status: HTTP/1.1 200 OK
Server:	Sun-Java-System-Web-Server/7.0	
Content-Type:	text/plain	
Last-Modified:	Wed, 30 Mar 2011 22:41:05 GMT	
ETag:	W/"5872020-4d93b181"	
Date:	Sat, 09 Apr 2011 03:54:31 GMT	
Transfer-Encoding:	chunked	
Connection:	close	
Connection:	Transfer-Encoding

Rendering it in the browser is correct because the browser can render text/plain
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
Well, every other browser has a way of dealing with this.
This is a duplicate, actually.  The actual headers the site sends include this:

  Content-Encoding: gzip

and the relevant code in nsBinaryDetector::DetermineContentType is:


699   // Check whether we have content-encoding.  If we do, don't try to
700   // detect the type.
701   // XXXbz we could improve this by doing a local decompress if we
702   // wanted, I'm sure.  
703   nsCAutoString contentEncoding;
704   httpChannel->GetResponseHeader(NS_LITERAL_CSTRING("Content-Encoding"),
705                                  contentEncoding);
706   if (!contentEncoding.IsEmpty()) {
707     return;
708   }
Whiteboard: DUPEME
What bug number is this a dupe of?
Boris: Do you know the bug number of the bug that this should be duped to?  If not, any hint?

It would be nice if this could be fixed, rather than Firefox being the only browser that can't handle anything but absolutely perfect websites.
I can't ind a bug on that, the sniffing however is from bug 220807.
This website is not a little bit less than perfect, it's just broken in a very bad way.
> Boris: Do you know the bug number

If I knew it offhand, I'd have marked this duplicate.  I would have to search, just like you.

Searching for "content-encoding" might work.

If you can't find an existing bug, we should just reopen this one and resummarize it to correctly describe the problem.
Thanks.  I found the following bugs, but I'm not sure that any is related:

Bug 205156
Bug 435480

However, I'm assuming your bug 366023 comment 28 describes the problem in this bug.  If that is correct, I can use that explanation.  If otherwise, I don't understand the problem enough to be able to describe it.
Yeah, neither of those two bugs is really it.  Neither does the comment you cite.  I'll just resummarize.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Summary: Firefox loading exe as though it were web content → Binary served as text/plain is not detected as binary when content-encoding:gzip is used
Whiteboard: DUPEME
Thanks, Boris.
Product: Core → Firefox
Version: Trunk → unspecified
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: