httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gben...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestRequest.pm
Date Wed, 14 Nov 2001 14:26:22 GMT
gbenson     01/11/14 06:26:22

  Modified:    perl-framework/Apache-Test/lib/Apache TestRequest.pm
  Log:
  Work correctly when the response is empty, for instance when we
  are pinging the server to see if it has warmed up yet.
  
  Revision  Changes    Path
  1.53      +7 -5      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.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- TestRequest.pm	2001/11/13 18:55:31	1.52
  +++ TestRequest.pm	2001/11/14 14:26:22	1.53
  @@ -294,11 +294,13 @@
           #GET, HEAD, POST
           $r = $UA->request($r);
           my $proto = $r->protocol;
  -        if ($proto !~ /^HTTP\/(\d\.\d)$/) {
  -            die "response had no protocol (is LWP broken or something?)";
  -        }
  -        if ($1 ne "1.0" && $1 ne "1.1") {
  -            die "response had protocol HTTP/$1 (headers not sent?)";
  +        if (defined($proto)) {
  +            if ($proto !~ /^HTTP\/(\d\.\d)$/) {
  +                die "response had no protocol (is LWP broken or something?)";
  +            }
  +            if ($1 ne "1.0" && $1 ne "1.1") {
  +                die "response had protocol HTTP/$1 (headers not sent?)";
  +            }
           }
       }
   
  
  
  

Mime
View raw message