Loading ...
Sorry, an error occurred while loading the content.
 

Re: grabbing bytelength?

Expand Messages
  • Byrne Reese
    Just out of curiousity, can you get this information from your webserver access logs? The outgoing response byte size is usually recorded there. Right?
    Message 1 of 3 , May 1, 2003
      Just out of curiousity, can you get this information from your
      webserver access logs? The outgoing response byte size is usually
      recorded there. Right?

      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.

      --- In soaplite@yahoogroups.com, "Rich" <krush_groover@y...> wrote:
      > is there an easy way to grab the bytelength (Content-Length) of the
      > outgoing http message... I'd like to dump it to a db to record any
      > anomalies as most of my soap posts will be the same general size.
      >
      > thanks
      > -Rich
    • Randy J. Ray
      ... He could get it there, yes, but only after the fact. ... I wouldn t exactly call it a hack-- you can sub-class SOAP::Transport::HTTP::Server and define
      Message 2 of 3 , May 1, 2003
        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.

        Randy
        --
        rjray@... http://www.rjray.org http://www.svsm.org

        Any spammers auto-extracting addresses from this message will definitely want
        to include uce@... and report@...
      Your message has been successfully submitted and would be delivered to recipients shortly.