[Twisted-web] Re: [PATCH] nevow.static.File directory listing

Christopher Armstrong radix at twistedmatrix.com
Fri Apr 2 23:54:38 MST 2004


Lee Harr wrote:
>> I was getting an infinitely recursive redirect
> 
> 
> Actually, this patch (to nevow.static.File) will also
> take care of the redirect:
> 
> 
> 
> 274c274,281
> <             return self.redirect(request)
> ---
> 
>>             if not request.uri.endswith('/'):
>>                 self.redirect(request)

You want to return the self.redirect(request). Otherwise the 
DirectoryLister will still get rendered to the body of the HTTP result, 
to no effect.

-- 
  Twisted | Christopher Armstrong: International Man of Twistery
   Radix  |          Release Manager,  Twisted Project
---------+           http://radix.twistedmatrix.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://pyramid.twistedmatrix.com/pipermail/twisted-web/attachments/20040403/f9b32dc1/signature.bin


More information about the Twisted-web mailing list