summaryrefslogtreecommitdiffstats
path: root/module/network/HTTPRequest.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-03-18 19:04:48 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-03-18 19:04:48 +0100
commit5d32c05eb764beed8a84dec1e91e0f8a8060899d (patch)
treed4d71b48908c097bde2a3ec9c7c2b80d54b5eccd /module/network/HTTPRequest.py
parentrender download progress (diff)
downloadpyload-5d32c05eb764beed8a84dec1e91e0f8a8060899d.tar.xz
added ReadWrite lock, render file progress on dashboard
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())