#10046: ModPythonHandler class should check for IOError when writing response
------------------------------------+---------------------------------------
          Reporter:  ewoudenberg    |         Owner:  nobody
            Status:  new            |     Milestone:        
         Component:  HTTP handling  |       Version:  1.0   
        Resolution:                 |      Keywords:        
             Stage:  Unreviewed     |     Has_patch:  1     
        Needs_docs:  0              |   Needs_tests:  0     
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Comment (by ewoudenberg):

 Graham, thank you for looking at this. To answer your questions:

 Replying to [comment:1 grahamd]:[[BR]]
 [[BR]]

 > This is possibly not addressing the real problem.
 >
 > Why is 'python_handler: Dispatch() returned non-integer.' happening in
 the first place.

 It's not -- it's happening in the 'second place', after modpython.py
 returns an exception object to the C mod_python code.
 [[BR]]
 [[BR]]

 > It would seem to be the case that the Django mod_python handler has a
 return path where it is not returning a proper HTTP status code but
 something else.
 Yes, and this is the path -- it's returning an Exception object rather
 than an integer code.
 [[BR]]
 [[BR]]



 > Same problem could arise if an exception other than IOError is
 generated.
 Yes, and in that case we should let the crash occur, it would be something
 we would want to know about.[[BR]]
 [[BR]]

 > It is also debatable whether IOError should be ignored in this situation
 as there are other reasons why an IOError could be raised and for other
 types of IOError it may be important that you know it happened.
 Yes, we could be more strict and just check for "Write failed, client
 closed connection." -- which I am sure can be safely ignored.
 [[BR]]
 [[BR]]



 > Your patch also doesn't address what happens if IOError were raised for
 other hosting mechanisms such as WSGI, FASTCGI etc.
 I think this change is more or less generic. It says, effectively "Do not
 crash on network write errors -- they're normal".

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10046#comment:2>
Django <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 django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to