Closed Bug 66181 Opened 24 years ago Closed 24 years ago

Content-Disposition filename with quotes is parsed wrong

Categories

(Core :: Networking: HTTP, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla0.9

People

(Reporter: stas-bugzilla, Assigned: darin.moz)

Details

(Keywords: verifyme)

Attachments

(1 file)

When I use Content-Disposition header for HTTP response, and give a filename as
a quoted string (according to RFC2183, filename can be given as filename=value,
where value is token or quoted-string), the file that user gets offered for
downlaod, contains double quotes.
I think Mozilla should detect this situation and strip the quotes.

Test case: connect with Mozilla to a socket, and give as a response header:

HTTP/1.1 200 OK
Content-type: application/x-msdos-program
Content-Disposition: inline; filename="test.txt"
Content-Length: 20
Connection: close

You will see that you are offered to download file "test.txt" - with quotes!
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
nominating for moz 0.9
Target Milestone: --- → mozilla0.9
added keyword nsbeta1
Keywords: nsbeta1
Scott, can you r/sr this patch?  Thanks!
r=gagan
Keywords: nsbeta1nsbeta1+
*doh* that's my bad. thanks darin.
sr=mscott
Patch checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
+verifyme: Tom, do you think our customizable HTTP test server can do this?
Keywords: verifyme
Ben, yeah, the internal testcase is 01ContentDisposition 

verified:  6/27 branch and trunk, all platforms
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: