Edgewall Software

Ticket #4255 (closed defect: fixed)

Opened 2 years ago

Last modified 17 months ago

Raw downloads of filenames with spaces are truncated in Firefox

Reported by: octo@… Owned by: jonas
Priority: normal Milestone: 0.11
Component: wiki system Version: 0.10
Severity: normal Keywords:
Cc:

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

Change History

Changed 2 years ago by jonas

  • status changed from new to assigned

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

Changed 2 years ago by jonas

  • status changed from assigned to closed
  • resolution set to fixed

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).

Changed 2 years ago by jonas

  • milestone set to 0.11

Add/Change #4255 (Raw downloads of filenames with spaces are truncated in Firefox)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from jonas. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.