perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/t/response/TestAPI rutil.pm
Date Thu, 24 Apr 2003 04:27:22 GMT
stas        2003/04/23 21:27:22

  Modified:    t/response/TestAPI rutil.pm
  Log:
  Apache 2.0.40 seems to have an incomplete request->as_string
  
  Revision  Changes    Path
  1.8       +13 -4     modperl-2.0/t/response/TestAPI/rutil.pm
  
  Index: rutil.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/rutil.pm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- rutil.pm	18 Apr 2003 06:18:58 -0000	1.7
  +++ rutil.pm	24 Apr 2003 04:27:22 -0000	1.8
  @@ -4,6 +4,7 @@
   use warnings FATAL => 'all';
   
   use Apache::Test;
  +use Apache::TestUtil;
   
   use APR::URI ();
   use Apache::RequestUtil ();
  @@ -27,6 +28,8 @@
      500 => '500 Internal Server Error',
   );
   
  +use constant HAVE_APACHE_2_0_40 => have_apache_version("2.0.40");
  +
   sub handler {
       my $r = shift;
   
  @@ -54,10 +57,16 @@
   
       ok $r->is_initial_req;
   
  -    # test for the request_line, status_ling, and few 
  -    # headers that should always be there
  -    ok $r->as_string =~ 
  -        m!GET /TestAPI__rutil.*Host:.*200 OK.*Content-Type:!s;
  +    # XXX: Apache 2.0.40 seems to miss status and content-type
  +    my $pattern = HAVE_APACHE_2_0_40
  +        ? qr!(?s)GET /TestAPI__rutil.*Host:.*!
  +        : qr!(?s)GET /TestAPI__rutil.*Host:.*200 OK.*Content-Type:!;
  +    ok t_cmp(
  +        $pattern,
  +        $r->as_string,
  +        "test for the request_line, host, status, and few " .
  +        " headers that should always be there"
  +    );
   
       Apache::OK;
   }
  
  
  

Mime
View raw message