commit ba655a0e4c0a80bc45d648e56ec3eb5777d599ac parent b59c17e543206220c1809ab0fe6131280dd02b1f Author: Philipp Hagemeister <phihag@phihag.de> Date: Fri, 23 Jan 2015 01:32:52 +0100 Merge remote-tracking branch 'derrotebaron/master' Diffstat:
M | youtube_dl/utils.py | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py @@ -612,7 +612,9 @@ class YoutubeDLHandler(compat_urllib_request.HTTPHandler): def http_request(self, req): for h, v in std_headers.items(): - if h not in req.headers: + # Capitalize is needed because of Python bug 2275: http://bugs.python.org/issue2275 + # The dict keys are capitalized because of this bug by urllib + if h.capitalize() not in req.headers: req.add_header(h, v) if 'Youtubedl-no-compression' in req.headers: if 'Accept-encoding' in req.headers: