diff options
author | fragonib <devnull@localhost> | 2011-05-02 16:13:24 +0200 |
---|---|---|
committer | fragonib <devnull@localhost> | 2011-05-02 16:13:24 +0200 |
commit | 85e725dc5a381c53b80b0c479de5b21416fbd3fd (patch) | |
tree | 1559e737614024d8f73c8f24ddb3d60bdec87806 /module/network | |
parent | Serveral Plugins: Clean up (diff) | |
download | pyload-85e725dc5a381c53b80b0c479de5b21416fbd3fd.tar.xz |
BitshareCom: I18N issues, HTTPRequest: Prevent follow redirection with just_header
Diffstat (limited to 'module/network')
-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 fa088391a..f0a80fd93 100644 --- a/module/network/HTTPRequest.py +++ b/module/network/HTTPRequest.py @@ -156,6 +156,8 @@ class HTTPRequest(): self.c.setopt(pycurl.HTTPHEADER, self.headers) if just_header: + self.c.setopt(pycurl.FOLLOWLOCATION, 0) + self.c.setopt(pycurl.HEADER, 1) self.c.setopt(pycurl.NOBODY, 1) self.c.perform() rep = self.header @@ -188,7 +190,7 @@ class HTTPRequest(): def write(self, buf): """ writes response """ - if self.rep.tell() > 500000 or self.abort: + if self.rep.tell() > 1000000 or self.abort: rep = self.getResponse() if self.abort: raise Abort() f = open("response.dump", "wb") |