diff options
author | mkaay <mkaay@mkaay.de> | 2010-12-22 22:12:39 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2010-12-22 22:12:39 +0100 |
commit | 2f40370822d500333b76f7d686bf8518575d67e3 (patch) | |
tree | a887f927c406e14812d871c807cf1ed21efe3cf9 /module/network | |
parent | cookie handling WIP -.- (diff) | |
download | pyload-2f40370822d500333b76f7d686bf8518575d67e3.tar.xz |
final cookie fix :D
Diffstat (limited to 'module/network')
-rw-r--r-- | module/network/CookieJar.py | 1 | ||||
-rw-r--r-- | module/network/CookieRedirectHandler.py | 5 |
2 files changed, 1 insertions, 5 deletions
diff --git a/module/network/CookieJar.py b/module/network/CookieJar.py index 372e2001e..b2cbba504 100644 --- a/module/network/CookieJar.py +++ b/module/network/CookieJar.py @@ -48,7 +48,6 @@ class CookieJar(PyCookieJar): cookies = self._cookies_for_request(request) attrs = self._cookie_attrs(cookies) - print attrs if attrs: if not request.has_header("Cookie"): request.add_header( diff --git a/module/network/CookieRedirectHandler.py b/module/network/CookieRedirectHandler.py index 3eeb3e711..785ae7598 100644 --- a/module/network/CookieRedirectHandler.py +++ b/module/network/CookieRedirectHandler.py @@ -38,12 +38,10 @@ class CookieRedirectHandler(BaseHandler): self.follow = follow def http_request(self, request): - print "add", self.cookiejar self.cookiejar.add_cookie_header(request) return request def http_response(self, request, response): - print "get", self.cookiejar self.cookiejar.extract_cookies(response, request) return response @@ -68,14 +66,13 @@ class CookieRedirectHandler(BaseHandler): # be conciliant with URIs containing a space newurl = newurl.replace(' ', '%20') newheaders = dict((k,v) for k,v in req.headers.items() - if k.lower() not in ("content-length", "content-type") + if k.lower() not in ("content-length", "content-type", "cookie") ) req = Request(newurl, headers=newheaders, origin_req_host=req.get_origin_req_host(), unverifiable=True) self.cookiejar.add_cookie_header(req) - print req.headers return req else: raise HTTPError(req.get_full_url(), code, msg, headers, fp) |