summaryrefslogtreecommitdiffstats
path: root/module/network/CookieRedirectHandler.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-12-22 22:12:39 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2010-12-22 22:12:39 +0100
commit2f40370822d500333b76f7d686bf8518575d67e3 (patch)
treea887f927c406e14812d871c807cf1ed21efe3cf9 /module/network/CookieRedirectHandler.py
parentcookie handling WIP -.- (diff)
downloadpyload-2f40370822d500333b76f7d686bf8518575d67e3.tar.xz
final cookie fix :D
Diffstat (limited to 'module/network/CookieRedirectHandler.py')
-rw-r--r--module/network/CookieRedirectHandler.py5
1 files changed, 1 insertions, 4 deletions
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)