Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#4255 closed defect (fixed)

Raw downloads of filenames with spaces are truncated in Firefox

Reported by: octo@… Owned by: Jonas Borgström
Priority: normal Milestone: 0.11
Component: wiki system Version: 0.10
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When selecting the raw download of an attached file from within Firefox, if the filename contains spaces, the filename is truncated at the first space.

For example, "Foo%20Bar.pdf" is seen as "Foo" by Firefox, which causes problems.

The problem is that the "filename=" parameter of the "Content-Disposition" header does not quote the filename, which confuses Firefox. (Other browsers work around this confusion, from what I've seen.)

The solution is to go to line 561 of attachment.py and add quotes to be printed around attachment.filename in the Content-Disposition header.

Attachments (0)

Change History (3)

comment:1 by Jonas Borgström, 17 years ago

Status: newassigned

You're right, the filename parameter should be escaped.

comment:2 by Jonas Borgström, 17 years ago

Resolution: fixed
Status: assignedclosed

This should be fixed in r4351.

It was pretty tricky find an enocoding that worked in multiple browsers. I've successfully verified that this type of rfc2231 encoding works with all browsers I have access to right now (firefox 2 and ie6).

comment:3 by Jonas Borgström, 17 years ago

Milestone: 0.11

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.