[utils] Let request headers override standard headers

What was I thinking when writing this?
pull/8/head
Philipp Hagemeister 10 years ago
parent 0963f92f23
commit 33ac271ba7

@ -767,8 +767,7 @@ class YoutubeDLHandler(compat_urllib_request.HTTPHandler):
def http_request(self, req):
for h, v in std_headers.items():
if h in req.headers:
del req.headers[h]
if h not in req.headers:
req.add_header(h, v)
if 'Youtubedl-no-compression' in req.headers:
if 'Accept-encoding' in req.headers:

Loading…
Cancel
Save