On Fri, Dec 23, 2005 at 03:37:40PM +0800, Orlando Andico wrote: > this is more a programming question.
More like an apache question to me. :-) [...] > i seem to have read somewhere (but cannot recall where) that if using a > PerlHandler, it's possible at any given time to figure out how many bytes > you've successfully sent to the remote client. true or false? If you limit the response being sent to the client, I guess it's possible with the help of $r->connection->aborted and/or trapping timeout. Otherwise, false in mod_perl v1.x and maybe true in mod_perl v2.x (using response input/output filter). With mod_perl (and mod_python i guess), you may get the total bytes_sent by calling $r->bytes_sent in the log and cleanup phases of apache http request lifecyle[1]. Hooks (like the log handler of mod_logio) in those phases are called once after the response phase. You will always get the total bytes_sent whether the client aborted during the response phase -- try aborting client connection and see the bytes_sent in the access_log recorded by mod_log_config (or mod_logio). HTH [1] http://perl.apache.org/docs/2.0/user/handlers/http.html#HTTP_Request_Cycle_Phases -- $_=q:; # SHERWIN # 70;72;69;6e;74;20; 27;4a;75;73;74;20; 61;6e;6f;74;68;65; 72;20;50;65;72;6c; 20;6e;6f;76;69;63; 65;27;:;;s=~?(..); ?=pack q$C$,hex$1; ;;;=egg;;;;eval;;; _________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List [email protected] (#PLUG @ irc.free.net.ph) Read the Guidelines: http://linux.org.ph/lists Searchable Archives: http://archives.free.net.ph

