projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db1e9ee
)
[YoutubeDL] Do not loose request method information
author
Sergey M․
<dstftw@gmail.com>
Sat, 30 May 2015 16:52:02 +0000
(22:52 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 30 May 2015 16:52:02 +0000
(22:52 +0600)
youtube_dl/YoutubeDL.py
patch
|
blob
|
history
diff --git
a/youtube_dl/YoutubeDL.py
b/youtube_dl/YoutubeDL.py
index 21d247f234cf7d8ed6a73bdc8132e4271d8a907a..5fc8754c6300669e829105c54a25a8f1465ee967 100755
(executable)
--- a/
youtube_dl/YoutubeDL.py
+++ b/
youtube_dl/YoutubeDL.py
@@
-49,6
+49,7
@@
from .utils import (
ExtractorError,
format_bytes,
formatSeconds,
+ HEADRequest,
locked_file,
make_HTTPS_handler,
MaxDownloadsReached,
@@
-1720,7
+1721,8
@@
class YoutubeDL(object):
if req_is_string:
req = url_escaped
else:
- req = compat_urllib_request.Request(
+ req_type = HEADRequest if req.get_method() == 'HEAD' else compat_urllib_request.Request
+ req = req_type(
url_escaped, data=req.data, headers=req.headers,
origin_req_host=req.origin_req_host, unverifiable=req.unverifiable)