httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestRequest.pm
Date Wed, 18 Feb 2004 16:33:09 GMT
geoff       2004/02/18 08:33:09

  Modified:    perl-framework/Apache-Test Changes
               perl-framework/Apache-Test/lib/Apache TestRequest.pm
  Log:
  HTTP/0.9 responses no longer croak, provided $ENV{APACHE_TEST_HTTP_09_OK}
  is true
  
  Revision  Changes    Path
  1.89      +3 -0      httpd-test/perl-framework/Apache-Test/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Changes,v
  retrieving revision 1.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- Changes	18 Feb 2004 00:30:57 -0000	1.88
  +++ Changes	18 Feb 2004 16:33:09 -0000	1.89
  @@ -8,6 +8,9 @@
   
   =item 1.08_dev
   
  +HTTP/0.9 responses no longer croak, provided $ENV{APACHE_TEST_HTTP_09_OK} 
  +is true.  [Geoffrey Young]
  +
   Hard-code listen directive to 127.0.0.1, solving problems for people
   with IPv4 & IPv6 address until a better solution is found [Gozer]
   
  
  
  
  1.94      +13 -2     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.93
  retrieving revision 1.94
  diff -u -r1.93 -r1.94
  --- TestRequest.pm	28 Nov 2003 18:19:45 -0000	1.93
  +++ TestRequest.pm	18 Feb 2004 16:33:09 -0000	1.94
  @@ -3,7 +3,10 @@
   use strict;
   use warnings FATAL => 'all';
   
  -BEGIN { $ENV{PERL_LWP_USE_HTTP_10} = 1; } #default to http/1.0
  +BEGIN { 
  +    $ENV{PERL_LWP_USE_HTTP_10}   = 1;    # default to http/1.0
  +    $ENV{APACHE_TEST_HTTP_09_OK} ||= 0;  # 0.9 responses are ok
  +}
   
   use Apache::Test ();
   use Apache::TestConfig ();
  @@ -438,7 +441,8 @@
                   $error = "response had no protocol (is LWP broken or something?)";
               }
               if ($1 ne "1.0" && $1 ne "1.1") {
  -                $error = "response had protocol HTTP/$1 (headers not sent?)";
  +                $error = "response had protocol HTTP/$1 (headers not sent?)"
  +                    unless ($1 eq "0.9" && $ENV{APACHE_TEST_HTTP_09_OK});
               }
           }
       }
  @@ -1006,6 +1010,13 @@
   true value, C<Apache::TestRequest> will pretend that LWP is not
   available so one can test whether the test suite will survive on a
   system which doesn't have libwww-perl installed.
  +
  +=item APACHE_TEST_HTTP_09_OK
  +
  +If the environment variable C<APACHE_TEST_HTTP_09_OK> is set to a
  +true value, C<Apache::TestRequest> will allow HTTP/0.9 responses
  +from the server to proceed.  The default behavior is to die if
  +the response protocol is not either HTTP/1.0 or HTTP/1.1.
   
   =back
   
  
  
  

Mime
View raw message