User Agent strings sent by *download* method

Suggestions and discussion of future versions
Post Reply
sbussetti
New User
New User
Posts: 5
Joined: Sat Mar 23, 2013 4:05 pm

User Agent strings sent by *download* method

Post by sbussetti »

Heya, so when using any of the download torrent file methods that result in a call to deluge.httpdownloader.download_file -- it uses the HTTPDownloader class .. in __init__, you're setting:

Code: Select all

agent = 'Deluge/%s (http://deluge-torrent.org)' % get_version()
Which, I get the rationale for identifying the downloader honestly, however, I've run into some sites that do naieve UA string checks, and reject requests from anything that doesn't look like a browser, even if you're appropriately forwarding valid cookies through deluge.

So, any possibility of allowing User-Agent to be set, for instance, via a call to deluge.core.core.Core.add_torrent_url when we're also forwarding a client's site cookies?

I can submit a PR as well, but just wanted to raise it here first.
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: User Agent strings sent by *download* method

Post by Cas »

That is a valid issue, if you open a ticket for 2.0 milestone we can look into that.
Post Reply