add torrent by link fails under certain conditions

Bug #762377 reported by j
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Downpour
Fix Committed
Medium
Unassigned

Bug Description

When the site that is being downloaded from has the download as part of it's index page, making the only thing after the final / query parameters, and it supplies the filename in the Content-Disposition header, but uses inline rather than attachment for the Content-Disposition, it fails to assign a filename and can't write the file to disk.

Also, it can't deal with unicode filenames. The problem is that the unicode constructor assumes that the given string is encoded in ASCII, and constructs the string with that in mind. There are basically three ways to deal with this:

(1) Assume that all input will be UTF-8, and write all the constructors for unicode as such.
(2) Use a exception based way of deciding how to do it...i.e.
try:
    unicode(string)
except UnicodeDecodeError:
    unicode(string,'utf-8')
(3) Use a function to check for any non-ASCII characters that will decode in the given format (with a default of 'utf-8')

As you can see, I chose to go with option 3.

Actually, as it is, its unicode support is pretty much unusable. However, I have gotten version 0.2 of it working with unicode (at least I have managed to visit all the idempotent pages successfully). I will submit that under a different bug report, because I felt it didn't really fit under this).

Revision history for this message
j (j-sassinak) wrote :
Changed in downpour:
milestone: none → 0.3
importance: Undecided → Medium
Changed in downpour:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.