[New-bugs-announce] [issue3704] cookielib doesn't handle URLs with / in parameters

Andy Kilpatrick report at bugs.python.org
Wed Aug 27 19:01:41 CEST 2008


New submission from Andy Kilpatrick <andy.kilpatrick at metaswitch.com>:

cookielib doesn't handle URLs like "http://server/script?
err=/base/error.html&ok=/base/ok.html", as 
CookieJar::_cookie_from_cookie_tuple uses rfind("/") to strip off the 
end of the URL, returning "http://server/script?
err=/base/error.html&okc=/base" instead of "http://server/script".

My suggested fix (attached, line 1465-1468) is to first strip off 
anything after "?" if present, then continue as with existing code.

----------
components: None
files: cookielib.py
messages: 72035
nosy: andyk
severity: normal
status: open
title: cookielib doesn't handle URLs with / in parameters
type: behavior
versions: Python 2.5
Added file: http://bugs.python.org/file11271/cookielib.py

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


More information about the New-bugs-announce mailing list