[Web-SIG] PEP 444 (aka Web3)

Tarek Ziadé ziade.tarek at gmail.com
Thu Sep 16 14:48:58 CEST 2010

On Thu, Sep 16, 2010 at 2:40 PM, Armin Ronacher
<armin.ronacher at active-4.com> wrote:
> Hi,
> On 9/16/10 2:38 PM, Tarek Ziadé wrote:
>> True... I don't know what's the best option here.. I guess we need to
>> provide all children so one may visit the whole graph.
> Another gripe I have with WSGI is that if you attempt to combine
> applications together with a dispatcher middleware, the inner application
> does not know the URL of the outer one.  It's SCRIPT_NAME points to itself
> and there is no ORIGINAL_SCRIPT_NAME.
>> Do you have a list of middleware that does this ?
> I know that Paste has a cascade middleware and I think it also has one that
> maps applications to specific prefixes.

Ah yes, the composite thing IIRC - I didn't know this was a middleware.

Should those be middlewares ? ISTM that they should in the front of
the stack instead, and that a stack of middleware should be dedicated
to a single application -- for the griefs you mentioned and probably
other problems.

I mean, one call does not visit several application, and this is some
kind of dynamic rewriting of the stack..

Another possibility would be to define a
"get_application(environ=None)" method so the middleware is able to
return the right app at the right moment

> Regards,
> Armin

Tarek Ziadé | http://ziade.org

More information about the Web-SIG mailing list