rss torrent downloading cannot handle 302 with relative path

Bug #919905 reported by luran
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qBittorrent
Fix Released
Medium
Christophe Dumez

Bug Description

I am using qbittorrent 2.9.0 in windows xp, and I tried to download torrent files in rss. The rss I have trouble with is http://bt.ktxp.com/rss.xml. It contains the url which is actually a http 302 pointing to the actual torrent file in a relative path. But I always got the error message that the file does not exists:

Cannot download file at url:
/torrents/2012/01/22/636d8e074ac65126f64c154b528e0659129f6276.torrent

and it seems qtorrent treated the relative location as a absolute path rather than a url.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Looks valid. I'll look into it as soon as I get some free time. Thanks for the report.

Changed in qbittorrent:
importance: Undecided → Medium
milestone: none → 2.9.4
status: New → Triaged
Revision history for this message
luran (luran) wrote :

I spent some time this weekend to build qbittorrent under windows and tried to fix this bug, the patch in the attachment works with the rss site I mentioned in the report. Did not test with other sites.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Excellent. Your patch looks good and I have applied a slightly altered version that checks if the url is relative before resolving it. It less likely to cause regressions. I'm attaching the patch so that you can test it.

Thanks a lot for taking the time to dive into the code and actually fix it. My work schedule is very busy at the moment and you really saved me some time :)

Changed in qbittorrent:
assignee: nobody → Christophe Dumez (hydr0g3n)
status: Triaged → Fix Committed
Revision history for this message
Christophe Dumez (hydr0g3n) wrote :
Revision history for this message
luran (luran) wrote :

I tried the patch yesterday, works fine with bt.ktxp.com, I tried some rss from other torrent site, all works great.

Changed in qbittorrent:
status: Fix Committed → Fix Released
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.