--- CookieCrumbler.py 2005-08-13 00:03:37.000000000 +0200 +++ CookieCrumbler.py 2005-08-13 00:03:32.000000000 +0200 @@ -238,7 +238,13 @@ came_from = req.get('came_from', None) if came_from is None: came_from = req['URL'] - url = '%s?came_from=%s&retry=%s&disable_cookie_login__=1' % ( + query = req.get('QUERY_STRING') + if query: + # Include the query string in came_from + if not query.startswith('?'): + query = '?' + query + came_from = came_from + query + url = '%s?came_from=%s&retry=%s&disable_cookie_login__=1' % ( page.absolute_url(), quote(came_from), retry) return url return None