[issue1570255] redirected cookies

John J Lee report at bugs.python.org
Wed Oct 15 23:03:15 CEST 2008


John J Lee <jjlee at users.sourceforge.net> added the comment:

Sorry I turned up rather late here (is there a way to subscribe to
changes to all bugs whose comments or title contain a given string?)

If it works with Firefox and not with cookielib it's almost certainly a
bug.  However, it's not clear to me from the report what the real bug
might be, because cookies aren't really redirected -- they're just added
to the new request following the usual rules for adding Cookie: headers
to requests.  That's why the redirect handler deliberately doesn't add
the unredirected headers -- the Cookie header gets added later on, by
HTTPCookieProcessor.  So, a diagnosis of the problem would involve
finding out why cookielib thinks that your cookie should not be returned
to the server in the request in question (which just happens to be a
redirected request).  Running your script with cookielib's logging
enabled (see the documentation) will probably be all that's required to
find that out; if you can still reproduce this, please post the log here
(sanitized to remove usernames, passwords, etc.).  If not, a test case,
or failing that a sanitized dump of the HTTP traffic, would be very useful.

----------
nosy: +jjlee

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1570255>
_______________________________________


More information about the Python-bugs-list mailing list