Commits

Robert Brewer committed ddd1538

Test and fix for scheme in querystring.

Comments (0)

Files changed (2)

cherrypy/test/test_objectmapping.py

         self.getPage('http://%s:%s/' % (self.interface(), self.PORT))
         self.assertBody('world')
         
+        self.getPage('http://%s:%s/abs/?service=http://192.168.0.1/x/y/z' %
+                     (self.interface(), self.PORT))
+        self.assertBody("default:('abs',)")
+        
+        self.getPage('/rel/?service=http://192.168.120.121:8000/x/y/z')
+        self.assertBody("default:('rel',)")
+        
         # Test that the "isolated" app doesn't leak url's into the root app.
         # If it did leak, Root.default() would answer with
         #   "default:('isolated', 'doesnt', 'exist')".

cherrypy/wsgiserver/__init__.py

             return None, None, uri
         
         i = uri.find('://')
-        if i > 0:
+        if i > 0 and '?' not in uri[:i]:
             # An absoluteURI.
             # If there's a scheme (and it must be http or https), then:
             # http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]