summaryrefslogtreecommitdiffstats
path: root/module/network/HTTPRequest.py
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2014-05-07 15:46:38 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-06-28 02:52:44 +0200
commitb653d564896086f8d608e8245ab23543f777ec7c (patch)
tree45877732764d463a15cf1078aa88d960048c8e23 /module/network/HTTPRequest.py
parentUpdated copyright year notice (diff)
downloadpyload-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.
Diffstat (limited to 'module/network/HTTPRequest.py')
-rw-r--r--module/network/HTTPRequest.py4
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