projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
b59c17e
)
Merge remote-tracking branch 'derrotebaron/master'
author
Philipp Hagemeister
<phihag@phihag.de>
Fri, 23 Jan 2015 00:32:52 +0000
(
01:32
+0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Fri, 23 Jan 2015 00:32:52 +0000
(
01:32
+0100)
youtube_dl/utils.py
patch
|
blob
|
history
diff --git
a/youtube_dl/utils.py
b/youtube_dl/utils.py
index b433b591bdfc690064523e226227fdbe34373c37..3536a5bd6f3216a62eaaec2ba11a08893c5e62ab 100644
(file)
--- 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: