[Twisted-web] Re: [Nevow-commits] r962 - One billion times better Choice...

James Y Knight foom at fuhm.net
Tue Dec 21 14:30:02 MST 2004

On Dec 21, 2004, at 12:32 PM, Larry White wrote:
> Hi,
> I'm interested in using twisted web (based on what i've read - I can't
> get it to install on my machine yet), and had a question about the
> design.
> It seems that the app routes requests to nodes in the resource tree.
> Is it possible to apply processing to the requests before and after
> the resource is retrieved?  In particular, can I specify that I want
> all the nodes on certain branches to have the same pre and post
> processing?  I'm thinking of something along the lines of Java Servlet
> Filters.

Before is easy: just insert a resource in the hierarchy that does its 
processing and then passes the request along to the real resource.

After is pretty hard with the current architecture. I'd suggest 
treating it like it's impossible, although it may be doable with 
sufficient amounts of hackery. I'm doing some work to make this sort of 
thing easier in web2, but I'm not going to make any promises as to when 
that will be done. The particular use-case I'm working on at the moment 
is a output filter to add HTTP range support to any resource.


More information about the Twisted-web mailing list