User Agent strings sent by *download* method

Suggestions and discussion of future versions
sbussetti
New User
New User
Posts: 5
Joined: Sat Mar 23, 2013 4:05 pm
OS or Distro: debian

User Agent strings sent by *download* method

Postby sbussetti » Sun Dec 11, 2016 7:31 pm

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: 3426
Joined: Mon Dec 07, 2009 6:04 am
OS or Distro: Ubuntu 16.04
Location: Scotland

Re: User Agent strings sent by *download* method

Postby Cas » Sun Jan 08, 2017 7:47 pm

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


Return to “Development”

Who is online

Users browsing this forum: No registered users and 4 guests