#8538: when process_response and process_exception middleware is invoked
---------------------------+------------------------------------------------
 Reporter:  TP             |       Owner:  nobody    
   Status:  new            |   Milestone:            
Component:  Documentation  |     Version:  SVN       
 Keywords:  middleware     |       Stage:  Unreviewed
Has_patch:  0              |  
---------------------------+------------------------------------------------
 It would be helpful if the django docs better covered the exact semantics
 of when middleware handlers are invoked. For example, if there's an
 exception will my custom middleware's process_exception hander be called?
 How about my process_response handler? This caused some subtle bugs on our
 website and I thought the docs could go into this more to help other
 people.

 It turns out that django runs exception handlers specified in middleware
 until one of them returns a response or until django has executed every
 exception handler. This means your custom handler may or may not be
 invoked. Second, if some exception handler returns a HttpResponse then the
 response handlers will be invoked. So your custom process_response may or
 may not be called after an exception occurs.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8538>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to