From 2f40370822d500333b76f7d686bf8518575d67e3 Mon Sep 17 00:00:00 2001
From: mkaay <mkaay@mkaay.de>
Date: Wed, 22 Dec 2010 22:12:39 +0100
Subject: final cookie fix :D

---
 module/network/CookieJar.py             | 1 -
 module/network/CookieRedirectHandler.py | 5 +----
 2 files changed, 1 insertion(+), 5 deletions(-)

(limited to 'module/network')

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)
-- 
cgit v1.2.3