I'm using Pylons 0.9.6.2 on Apache 2.2.10 with mod_wsgi 2.3 in embedded mode on XP SP2.
I'm trying to set up something similar to IIS's IsClientConnected property so that I can check if a user received all output or if their connection was aborted/dropped before that (e.g., make sure they received an entire one-time download). I've read through these posts/references: "client connection closed" issue http://groups.google.com/group/modwsgi/browse_thread/thread/71557453903756a8 cancelling a request if client closes http socket http://groups.google.com/group/modwsgi/browse_thread/thread/8ebd9aca9d317ac9 [Web-SIG] Closing long-running WSGI requests (possible?) http://www.mail-archive.com/[email protected]/msg02661.html Registering Cleanup Code http://code.google.com/p/modwsgi/wiki/RegisteringCleanupCode It *seems* like I should be able to do this by using yield to return a generator. The code seems to sync up with that: http://code.google.com/p/modwsgi/source/browse/tags/mod_wsgi-2.3/mod_wsgi.c#3047 However, if I simulate this, the generator gets exhausted and its close operation called before mod_wsgi logs its "IOError: client connection closed" error. I added debugging output to encode_unicode_app_iter in paste.wsgilib, which appears to be the very last step before mod_wsgi part just to make sure I still have a generator at that point. Am I missing something to get this working? Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "modwsgi" 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/modwsgi?hl=en -~----------~----~----~----~------~----~------~--~---
