On Wed, Sep 03, 2003 at 11:54:20PM +0400, Oleg Broytmann wrote: > This is exactly the bug that I am trying to fix. It is not a bug in > Quixote, it is a bug in M$IE - that user agent sends URL fragments. Okay, how about the attached patch? It seems that Apache drops fragments (guess that's why I've never seen this bug). It seems reasonable that the Medusa server should do the same. Neil Index: medusa_http.py =================================================================== --- medusa_http.py (revision 22369) +++ medusa_http.py (working copy) @@ -56,9 +56,14 @@ def continue_request (self, data, request): msg = rfc822.Message(StringIO('\n'.join(request.header))) remote_addr, remote_port = request.channel.addr - query_string = '' + if '#' in request.uri: + # MSIE is buggy and sometimes includes fragments in URLs + [request.uri, fragment] = request.uri.split('#', 1) if '?' in request.uri: - [request.uri, query_string] = request.uri.split('?', 1) + [path, query_string] = request.uri.split('?', 1) + else: + path = request.uri + query_string = '' environ = {'REQUEST_METHOD': request.command, 'ACCEPT_ENCODING': msg.get('Accept-encoding'), @@ -68,7 +73,7 @@ 'HTTP_COOKIE': msg.get('Cookie'), 'HTTP_REFERER': msg.get('Referer'), 'HTTP_USER_AGENT': msg.get('User-agent'), - 'PATH_INFO': request.uri, + 'PATH_INFO': path, 'QUERY_STRING': query_string, 'REMOTE_ADDR': remote_addr, 'REMOTE_PORT': str(remote_port),