Page 1 of 1

User Agent strings sent by *download* method

Posted: Sun Dec 11, 2016 7:31 pm
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.

Re: User Agent strings sent by *download* method

Posted: Sun Jan 08, 2017 7:47 pm
by Cas
That is a valid issue, if you open a ticket for 2.0 milestone we can look into that.