httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestRequest.pm
Date Thu, 07 Mar 2002 04:13:25 GMT
dougm       02/03/06 20:13:25

  Modified:    perl-framework/Apache-Test/lib/Apache TestRequest.pm
  Log:
  prefix all lwp trace output lines with #'s
  
  Revision  Changes    Path
  1.65      +8 -16     httpd-test/perl-framework/Apache-Test/lib/Apache/TestRequest.pm
  
  Index: TestRequest.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRequest.pm,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- TestRequest.pm	7 Mar 2002 04:00:13 -0000	1.64
  +++ TestRequest.pm	7 Mar 2002 04:13:25 -0000	1.65
  @@ -220,8 +220,8 @@
   
       #like having some -v info
       my $cert = $sock->get_peer_certificate;
  -    print "Cipher:  ", $sock->get_cipher, "\n";
  -    print "Peer DN: ", $cert->subject_name, "\n";
  +    print "#Cipher:  ", $sock->get_cipher, "\n";
  +    print "#Peer DN: ", $cert->subject_name, "\n";
   }
   
   sub prepare {
  @@ -315,21 +315,12 @@
   
       unless ($r->header('Content-Length') or $r->header('Transfer-Encoding')) {
           $r->header('Content-Length' => length $content);
  -        $r->header('X-Content-length-note' => 'added by Apache::TestReqest');
  +        $r->header('X-Content-length-note' => 'added by Apache::TestRequest');
       }
   
  -    if ($want_body) {
  -        if (defined $content) {
  -            #prevent double "ok $x" output
  -            (my $copy = $content) =~ s/^/\#/mg;
  -            $r->content($copy);
  -        }
  -    }
  -    else {
  -        $r->content(undef);
  -    }
  +    $r->content(undef) unless $want_body;
   
  -    my $string = $r->as_string;
  +    (my $string = $r->as_string) =~ s/^/\#/mg;
       $r->content($content); #reset
       $string;
   }
  @@ -380,8 +371,9 @@
           my($url, @rest) = @_;
           $name = (split '::', $name)[-1]; #strip HTTP::Request::Common::
           $url = resolve_url($url);
  -        print "$name $url:\n", $r->request->headers_as_string, "\n";
  -        print lwp_as_string($r, $DebugLWP > 1);
  +        print "#lwp request:\n", "#$name $url:\n#",
  +              $r->request->headers_as_string, "\n";
  +        print "#server response:\n", lwp_as_string($r, $DebugLWP > 1);
       }
   
       die $error if $error;
  
  
  

Mime
View raw message