diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-18 19:04:48 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-18 19:04:48 +0100 |
commit | 5d32c05eb764beed8a84dec1e91e0f8a8060899d (patch) | |
tree | d4d71b48908c097bde2a3ec9c7c2b80d54b5eccd /module/network/HTTPRequest.py | |
parent | render download progress (diff) | |
download | pyload-5d32c05eb764beed8a84dec1e91e0f8a8060899d.tar.xz |
added ReadWrite lock, render file progress on dashboard
Diffstat (limited to 'module/network/HTTPRequest.py')
-rw-r--r-- | module/network/HTTPRequest.py | 4 |
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()) |