Ticket #46 (closed defect: fixed)
Files handler bug with filenames containing a space
| Reported by: | DarTar | Owned by: | BrianKoontz |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.3.1 |
| Component: | handlers | Version: | 1.1.6.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description (last modified by DarTar) (diff)
Files handler: if the filename contains a space, Moz/FF will show only the first word in the download dialog; filename should be enclosed in quotes.
Thanks to MrTrick for pointing out this problem It is possible to upload files with a space in the file name. However, when trying to download such a file things don't work as expected: in Mozilla browsers (Mozilla, Firefox, etc.) the suggested filename for the download is truncated at the first space. Two possible solutions:
- Prevent that file names are stored with spaces in the name; simply replacing all spaces with underscores would do the trick and keep the file name recognizable. This has the advantage that no assumptions are being made about the server OS or the user's OS as to whether spaces in file names are valid.
- Mozilla seems to pick up the suggested file name from the Content-Disposition header. (raw)urlencoding the file name here works, but then displays the name with the encoding; enclosing the file name in (double) quotes works better, showing the full file name with spaces. This has the advantage that the original file name is preserved - provided both the server OS and the downloading user's OS can handle such file names.
Take your pick ;-) -- JavaWoman
Related tickets
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
