Is there a reason _request_middleware's are called in the BaseHandler,
while _response_middleware's are called in the subclass (i.e.
ModPythonHandler)?

Also, in BaseHandler.load_middleware, I noticed that an exception
loading any middleware will leave the middlewares not None, but also
not valid since remaining middleware's will not be loaded.   Is this a
philosophical choice (i.e. you don't want to load later middleware's
as they may depend on earlier ones or, maybe, you don't want to
repeatedly try loading a broken middleware stack) or an accident of
implementation?

If philosophical, I think leaving the middleware stack totally
unloaded is safer than leaving it partially loaded after failure of
some component.

Finally, if I understand the code correctly, it'd be useful to
document that middleware can cause the response's iterator to be
evaluated before it's actually ready to be rendered.  Which is to say,
if the iterator is intended to manage resource usage to stream large
or long responses to the client, that intent may be foiled by using
middleware like gzip.

I know these are pretty fine points.  I'm just getting more familiar
with django's internals and making notes as I go.

Cheers,
  Jeremy

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to