[Twisted-web] new http auth stuff

Phil Mayers p.mayers at imperial.ac.uk
Fri Feb 27 08:40:49 EST 2009


All,

The new HTTPAuthSessionWrapper stuff in Twisted 8.2 seems to have a bug. 
Specifically, the 1st component of the URL is thrown away by the 
HTTPAuthSessionWrapper getChildWithDefault method.

So, if I define a resource:

class Page(resource.Resource):
   def getChild(self, path, request):
     if path=='foo':
       return Foo()
     elif path=='bar':
       return Bar()

...then hitting the url:

http://localhost:8080/foo

...just gives me the Page() resource, but if I hit:


http://localhost:8080/ANYSTRING/foo

...I get a Foo()

Am I seeing a bug, or am I using it wrong?



More information about the Twisted-web mailing list