--- Lib/cookielib.py 2008-05-26 15:30:27.000000000 -0700 +++ ../cookielib-issue3704.py 2008-08-27 23:08:41.000000000 -0700 @@ -1462,6 +1462,10 @@ else: path_specified = False path = request_path(request) + # Strip off parameters after ? + i = path.rfind("?") + if i != -1: + path = path[:i] i = path.rfind("/") if i != -1: if version == 0: