Edit report at https://bugs.php.net/bug.php?id=64644&edit=1
ID: 64644 Updated by: ras...@php.net Reported by: matteosistisette at gmail dot com Summary: Client-side abortion should be detected regardless of sending output Status: Not a bug Type: Bug Package: *General Issues Operating System: Linux PHP Version: 5.3.24 Block user comment: N Private report: N New Comment: If you need this feature I would suggest you work on it and submit a patch. I doubt anybody here is going to. We work on things we need ourselves. Usually for any long-running things like this we farm it off to something like a Gearman job and check for progress via AJAX. Having a frontend Apache process tied up with something where super accurate client disconnect detection is relevant tends to be too inefficient. Previous Comments: ------------------------------------------------------------------------ [2013-04-14 01:23:33] matteosistisette at gmail dot com Sh**, my last comment got silently discarded somehow!! Please talk to apache developers directly! If I were developing PHP, I would feel the urge to fix this issue (or call it "implement this feature" if you want, a basic vital feature whose lack is a huge issue) and if this is not possible due to a bug (or design flaw) in Apache I would strive to have them fix it. ------------------------------------------------------------------------ [2013-04-14 00:42:33] ras...@php.net They are basically saying that we could try to hack around Apache and try to write directly to do direct socket ops on a socket opened and managed by Apache. Very bad idea. I don't know of any environment that attempts to do this. See this conversation about the same issue in Django, for example: http://stackoverflow.com/questions/6019145/how-do-i-detect-an-aborted- connection-in-django This isn't something we are going to address with hacks in PHP. ------------------------------------------------------------------------ [2013-04-13 23:41:08] matteosistisette at gmail dot com Response from Apache developers: https://issues.apache.org/bugzilla/show_bug.cgi?id=54842#c1 I'm not sure I fully understand it but it seems they say there actually IS a way PHP can figure out if the connection is closed without attempting to write. ------------------------------------------------------------------------ [2013-04-13 22:15:41] matteosistisette at gmail dot com Unbelievable. Then the huge design flaw is in Apache. ------------------------------------------------------------------------ [2013-04-13 21:59:18] ras...@php.net Apache handles the communication with the client browser and provides no mechanism for PHP to discover a client abort except on an actual write. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=64644 -- Edit this bug report at https://bugs.php.net/bug.php?id=64644&edit=1