youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit 33ac271ba723365ecb7e3f7cd9fd9d99d0f8615b
parent 0963f92f23552800b5897d9f5f43ba3670679bbf
Author: Philipp Hagemeister <phihag@phihag.de>
Date:   Tue, 26 Aug 2014 11:51:48 +0200

[utils] Let request headers override standard headers

What was I thinking when writing this?

Diffstat:
Myoutube_dl/utils.py | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py @@ -766,10 +766,9 @@ class YoutubeDLHandler(compat_urllib_request.HTTPHandler): return ret def http_request(self, req): - for h,v in std_headers.items(): - if h in req.headers: - del req.headers[h] - req.add_header(h, v) + for h, v in std_headers.items(): + if h not in req.headers: + req.add_header(h, v) if 'Youtubedl-no-compression' in req.headers: if 'Accept-encoding' in req.headers: del req.headers['Accept-encoding']