Clicking links to JPEG file with Chinese name download the file instead of displaying it in browser

RESOLVED FIXED

Status

Core Graveyard
File Handling
--
major
RESOLVED FIXED
13 years ago
2 years ago

People

(Reporter: stephen@ju-ju.com, Assigned: Jungshik Shin)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.3) Gecko/20041026 Firefox/1.0RC1
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.3) Gecko/20041026 Firefox/1.0RC1

When clicking at any of the links to JPEG files with Chinese filename in the
page, FireFox downloads the file instead of displays the file in the browser window.

Reproducible: Always
Steps to Reproduce:
1. Go to the URL.
2. Click at any of the JPG links with Chinese names.


Actual Results:  
FireFox shows the "Opening..." dialog and asks to choose what to do with the file.

Expected Results:  
Display the picture directly within FireFox window.
Odd. The site's headers appear to be invalid, since it should specify
content-disposition: inline; filename=... and the filename should be encoded
according to RFC 2231, but it seems odd that bad characters in the filename
would force treating it as attachment, when the same headers without character
issues doesn't.

Same result in Seamonkey: --> Browser.
Assignee: bugs → file-handling
Component: File Handling → File Handling
Product: Firefox → Browser
QA Contact: bmo → ian
Version: unspecified → Trunk
(Assignee)

Comment 2

13 years ago
Created attachment 164572 [details] [diff] [review]
patch

This will 'fix' this problem (I've already tested it). However, I'm not sure
whether we have to do this because as noted in the previous comment, this is
actually an 'evangelism' issue.
Assignee: file-handling → jshin
Status: UNCONFIRMED → ASSIGNED
(Assignee)

Comment 3

13 years ago
Boris, what do you think of attachment 164572 [details] [diff] [review]? It's a bit hackish, but we may
have to. An alternative is to tweak (a) nsIMIMEHeaderParam method(s). 
OS: MacOS X → All
Hardware: Macintosh → All
That approach looks fine, but why the QIing?  originCharset is an nsIURI property...
(Assignee)

Comment 5

13 years ago
Created attachment 164850 [details] [diff] [review]
patch update

Thanks. I got rid of QIing.
Attachment #164572 - Attachment is obsolete: true
(Assignee)

Comment 6

13 years ago
Comment on attachment 164850 [details] [diff] [review]
patch update

asking for r/sr
Attachment #164850 - Flags: superreview?(bzbarsky)
Attachment #164850 - Flags: review?(cbiesinger)
Comment on attachment 164850 [details] [diff] [review]
patch update

hmm...
 95	NS_ASSERTION(!aTryLocaleCharset, "aTryLocaleCharset not yet supported
!");

but sure. r=biesi
Attachment #164850 - Flags: review?(cbiesinger) → review+
Comment on attachment 164850 [details] [diff] [review]
patch update

sr=bzbarsky
Attachment #164850 - Flags: superreview?(bzbarsky) → superreview+
(Assignee)

Comment 9

13 years ago
Created attachment 164984 [details] [diff] [review]
patch for branches (1.7 and av1)

This is identical to attachment 164850 [details] [diff] [review] as far as what this patch touches is
concerned. The difference lies in the 'surrounding' where EqualsIgnorecase is
used in place of EqualsLowerCaseLiteral (which was intrdouced in 1.8 cycle).
(Assignee)

Comment 10

13 years ago
Comment on attachment 164984 [details] [diff] [review]
patch for branches (1.7 and av1)

carrying over r/sr from the trunk patch and asking for a to branches.

I came across this bug from time to time. It's not critical, but kinda 'glitch'
that may as well be removed in ff 1.0
Attachment #164984 - Flags: superreview+
Attachment #164984 - Flags: review+
Attachment #164984 - Flags: approval1.7.x?
Attachment #164984 - Flags: approval-aviary?
(Assignee)

Comment 11

13 years ago
marking as fixed as this was checked into the trunk
Status: ASSIGNED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED

Comment 13

13 years ago
Comment on attachment 164984 [details] [diff] [review]
patch for branches (1.7 and av1)

If this didn't make it in for Firefox 1.0 then I don't think we want it for
1.7.x since those two are supposed to be gecko equivalents. Please re-request
if I'm wrong.
Attachment #164984 - Flags: approval1.7.x?
Attachment #164984 - Flags: approval1.7.x-
Attachment #164984 - Flags: approval-aviary?
Attachment #164984 - Flags: approval-aviary-
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.