From b653d564896086f8d608e8245ab23543f777ec7c Mon Sep 17 00:00:00 2001 From: Stefano Date: Wed, 7 May 2014 15:46:38 +0200 Subject: 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. --- module/network/HTTPRequest.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'module/network') 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 -- cgit v1.2.3