On 2003.05.01 09:17 Byrne Reese wrote:
> Just out of curiousity, can you get this information from your
> webserver access logs? The outgoing response byte size is usually
> recorded there. Right?
He could get it there, yes, but only after the fact.
> Otherwise, I am not sure what to say. SOAP::Lite does not give you
> access to the HTTP::Request and HTTP::Response objects directly. If
> there is a way, it is through a hack.
I wouldn't exactly call it a hack-- you can sub-class
SOAP::Transport::HTTP::Server and define your own response() method. This gets
called when the server core is setting the HTTP::Response object to be
returned to the client. The HTTP::Response object passed in is what the
SOAP::Server core has prepared. You should be able to fetch the
'Content-Length' header, or just length() on the content() method. Then pass
the argument along to the super-class method with
"$self->SUPER::response($arg)". Note that this method can be called with no
argument, meaning that it is retrieving the response object. Then you'd just
go straight to the SUPER::response.
Not the be an obvious salesman, but I cover this in "Programming Web Services
with Perl" :-). Not this exact detail, but the general concept of sub-classing
the transport modules.
rjray@... http://www.rjray.org http://www.svsm.org
Any spammers auto-extracting addresses from this message will definitely want
to include uce@...