httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julien FROMENT <Julien.FROM...@sagemcom.com>
Subject RE: Tracking sent responses
Date Fri, 06 Nov 2015 16:18:45 GMT
Thanks for the reply Sorin.

Does the number of bytes sent written by the log  take into account the fact that a browser
could cancel the request halfway through?

For example, if a client request a 100MB file, and cancel the transfer after 50MB, will the
log report 50MB?

Julien

-----Original Message-----
From: Sorin Manolache [mailto:sorinm@gmail.com] 
Sent: Friday, November 06, 2015 9:29 AM
To: modules-dev@httpd.apache.org
Subject: Re: Tracking sent responses

On 2015-11-06 15:12, Julien FROMENT wrote:
> Hello,
>
>
>
> We would like to use Apache HTTP Server to keep track of exactly what 
> part of the response was sent over a socket. Apache could call an API 
> asynchronously with the number of bytes sent over the socket for a 
> given request.
>
>
>
> Here is the pseudo code:
>
>    -- Client send a request
>
>    -- Apache processes the request and send it to the backend server
>
>    ...
>
>    -- The backend server returns the response
>
>    -- Apache sends the response to the client
>
>    -- Apache calls Async API with the number of bytes sent
>

Relaying the client request to a backend server may be realised with the ProxyPass and RewriteRule
directives.

Apache may log the number of bytes sent. See http://httpd.apache.org/docs/current/mod/mod_log_config.html#formats,
the %B and %O flags.

The log can be configured to be

1. appended to a file
2. sent to syslog (which in turn may forward it over udp/tcp to a log-host) 3. piped to an
external program

The first two options do not require any development from your part. If you really need that
the number of bytes is sent to an http server, then you could write an external program that
reads one line at a time from standard input and sends the line that it read to an http server.

Regards,
Sorin


#
" Ce courriel et les documents qui lui sont joints peuvent contenir des informations confidentielles
ou ayant un caractè privéS'ils ne vous sont pas destiné nous vous signalons qu'il est strictement
interdit de les divulguer, de les reproduire ou d'en utiliser de quelque maniè que ce soit
le contenu. Si ce message vous a é transmis par erreur, merci d'en informer l'expéteur et
de supprimer imméatement de votre systè informatique ce courriel ainsi que tous les documents
qui y sont attaché"


                               ******

" This e-mail and any attached documents may contain confidential or proprietary information.
If you are not the intended recipient, you are notified that any dissemination, copying of
this e-mail and any attachments thereto or use of their contents by any means whatsoever is
strictly prohibited. If you have received this e-mail in error, please advise the sender immediately
and delete this e-mail and all attached documents from your computer system."
#


#
" Ce courriel et les documents qui lui sont joints peuvent contenir des
informations confidentielles ou ayant un caractè privéS'ils ne vous sont
pas destiné nous vous signalons qu'il est strictement interdit de les
divulguer, de les reproduire ou d'en utiliser de quelque maniè que ce
soit le contenu. Si ce message vous a é transmis par erreur, merci d'en
informer l'expéteur et de supprimer imméatement de votre systè
informatique ce courriel ainsi que tous les documents qui y sont attaché"


                               ******

" This e-mail and any attached documents may contain confidential or
proprietary information. If you are not the intended recipient, you are
notified that any dissemination, copying of this e-mail and any attachments
thereto or use of their contents by any means whatsoever is strictly
prohibited. If you have received this e-mail in error, please advise the
sender immediately and delete this e-mail and all attached documents
from your computer system."
#


Mime
View raw message