diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2015-03-03 13:56:06 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2015-03-03 13:56:06 +0100 |
commit | 2461f79d2ad9eee44644f6187e366125a29aa70f (patch) | |
tree | 9c8490ac92b196f1d9feb5a49b4d6d31809c2879 /youtube_dl/YoutubeDL.py | |
parent | 91410c9bfa9fd8f01fb817474bcc7b0db5cabf95 (diff) |
[utils] Correct per-request proxy handling
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rwxr-xr-x | youtube_dl/YoutubeDL.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index 915963d96..df2aebb59 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -1771,7 +1771,8 @@ class YoutubeDL(object): https_handler = make_HTTPS_handler(self.params, debuglevel=debuglevel) ydlh = YoutubeDLHandler(self.params, debuglevel=debuglevel) opener = compat_urllib_request.build_opener( - https_handler, proxy_handler, cookie_processor, ydlh) + proxy_handler, https_handler, cookie_processor, ydlh) + # Delete the default user-agent header, which would otherwise apply in # cases where our custom HTTP handler doesn't come into play # (See https://github.com/rg3/youtube-dl/issues/1309 for details) |