summaryrefslogtreecommitdiffstats
path: root/module/network/HTTPRequest.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/network/HTTPRequest.py')
-rw-r--r--module/network/HTTPRequest.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/network/HTTPRequest.py b/module/network/HTTPRequest.py
index 990148e0f..874da368b 100644
--- a/module/network/HTTPRequest.py
+++ b/module/network/HTTPRequest.py
@@ -193,13 +193,14 @@ class HTTPRequest():
self.setRequestContext(url, get, post, referer, cookies, multipart)
+ # TODO: use http/rfc message instead
self.header = ""
self.c.setopt(pycurl.HTTPHEADER, self.headers)
if just_header:
self.c.setopt(pycurl.FOLLOWLOCATION, 0)
- self.c.setopt(pycurl.NOBODY, 1)
+ self.c.setopt(pycurl.NOBODY, 1) #TODO: nobody= no post?
# overwrite HEAD request, we want a common request type
if post:
@@ -233,6 +234,7 @@ class HTTPRequest():
def verifyHeader(self):
""" raise an exceptions on bad headers """
code = int(self.c.getinfo(pycurl.RESPONSE_CODE))
+ # TODO: raise anyway to be consistent, also rename exception
if code in bad_headers:
#404 will NOT raise an exception
raise BadHeader(code, self.getResponse())