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

Re: access to raw CGI post data on server

Expand Messages
  • 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 1 of 4 , Nov 30, 2005
    • 0 Attachment
      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.