diff options
author | Stefano <l.stickell@yahoo.it> | 2014-05-07 15:46:38 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-06-28 02:52:44 +0200 |
commit | b653d564896086f8d608e8245ab23543f777ec7c (patch) | |
tree | 45877732764d463a15cf1078aa88d960048c8e23 | |
parent | Updated copyright year notice (diff) | |
download | pyload-b653d564896086f8d608e8245ab23543f777ec7c.tar.xz |
Fixed just_header HEAD request issue.
Using just_header=True an HEAD request was always performed, so no POST parameters were sent. Also sometimes hosters block this kind of requests.
-rw-r--r-- | module/network/HTTPRequest.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/module/network/HTTPRequest.py b/module/network/HTTPRequest.py index a01c3a54c..4228725ec 100644 --- a/module/network/HTTPRequest.py +++ b/module/network/HTTPRequest.py @@ -193,6 +193,10 @@ class HTTPRequest(): if just_header: self.c.setopt(pycurl.FOLLOWLOCATION, 0) self.c.setopt(pycurl.NOBODY, 1) + if post: + self.c.setopt(pycurl.POST, 1) + else: + self.c.setopt(pycurl.HTTPGET, 1) self.c.perform() rep = self.header |