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

Re: access to raw CGI post data on server

Expand Messages
  • Alois Treindl
    ... I am afraid I do not really understand these two references, i.e. how to apply the information there to my actual example. Would it be possible to give
    Message 1 of 4 , Nov 27, 2005
      --- In soaplite@yahoogroups.com, "Byrne Reese" <byrne@m...> wrote:
      >
      > Check out:
      >
      > http://www.majordojo.com/archives/2005/03/unlocking_065_d.php
      >
      > And
      >
      > http://www.majordojo.com/archives/2004/10/intercepting_th.php
      >

      I am afraid I do not really understand these two references, i.e. how
      to apply the information there to my actual example.

      Would it be possible to give more precise instractions, for my case?
    • Alois Treindl
      I solved the problem myself. Made a little modifications in Transport::HTTP.pm to save the local variable $content into a globally visible $save_content for
      Message 2 of 4 , Nov 30, 2005
        I solved the problem myself.

        Made a little modifications in Transport::HTTP.pm to save the local
        variable $content into a globally visible $save_content for each
        received request, just after is was read raw from the stdin.

        Then, in the log_faults() function below,
        we can print $SOAP::Transport::HTTP::saved_content
        to the fault logfile.

        by the way, the original problem I had reported turned out to be
        caused by the soap client. Some incorrect initialisation of re-used
        components on the client resulted in incorrect service calls.

        Alois



        --- In soaplite@yahoogroups.com, "Alois Treindl" <alois@a...> wrote:
        >
        > To debug a rare server problem with failing CGIs, we
        > have added a trace function for faults in the service cgi, like this:
        >
        > use SOAP::Lite +trace => [ fault => \&log_faults ];
        >
        > sub log_faults {
        > open LOGFILE,">/tmp/fault.log";
        > print LOGFILE join "\n", @_;
        > foreach (keys %ENV) {
        > print LOGFILE "ENV{$_} = $ENV{$_}\n";
        > }
        > close LOGFILE;
        > }
        >
        >
        > This logs the soap fault message and all HTTP environment variables.
        >
        > We would like to see the original POST data of the cgi request
        > (the incoming xml file).
        >
        > How can I access this at this stage, to print it into the fault-logfile?
      Your message has been successfully submitted and would be delivered to recipients shortly.