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/t/http11 basicauth.t chunked.t
Date Thu, 06 Dec 2001 23:00:26 GMT
dougm       01/12/06 15:00:26

  Modified:    perl-framework/Apache-Test/lib/Apache TestRequest.pm
               perl-framework/t/http11 basicauth.t chunked.t
  Log:
  newer versions of LWP changed 'Client-Request-Num' header to
  'Client-Response-Num'; add support for both.
  
  Revision  Changes    Path
  1.58      +6 -0      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.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- TestRequest.pm	2001/11/21 20:53:32	1.57
  +++ TestRequest.pm	2001/12/06 23:00:26	1.58
  @@ -80,6 +80,12 @@
       eval { $UA ||= __PACKAGE__->new(@_); };
   }
   
  +sub user_agent_request_num {
  +    my $res = shift;
  +    $res->header('Client-Request-Num') ||  #lwp 5.60
  +      $res->header('Client-Response-Num'); #lwp 5.62+
  +}
  +
   sub do_request {
       my($ua, $method, $url, $callback) = @_;
       my $r = HTTP::Request->new($method, resolve_url($url));
  
  
  
  1.5       +1 -1      httpd-test/perl-framework/t/http11/basicauth.t
  
  Index: basicauth.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/http11/basicauth.t,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- basicauth.t	2001/11/01 21:45:57	1.4
  +++ basicauth.t	2001/12/06 23:00:26	1.5
  @@ -23,7 +23,7 @@
   
   ok $res->code == 200;
   
  -my $request_num = $res->header('Client-Request-Num');
  +my $request_num = Apache::TestRequest::user_agent_request_num($res);
   
   ok $request_num == 3; #1 => no credentials
                         #2 => 401 response with second request
  
  
  
  1.13      +4 -2      httpd-test/perl-framework/t/http11/chunked.t
  
  Index: chunked.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/http11/chunked.t,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- chunked.t	2001/11/06 19:20:53	1.12
  +++ chunked.t	2001/12/06 23:00:26	1.13
  @@ -45,7 +45,8 @@
           ok length($body) == $length;
   
           $requests++;
  -        my $request_num = $res->header('Client-Request-Num');
  +        my $request_num =
  +          Apache::TestRequest::user_agent_request_num($res);
   
           return $request_num == $requests;
       }, 5;
  @@ -74,7 +75,8 @@
           ok length($body) == $length;
   
           $requests++;
  -        my $request_num = $res->header('Client-Request-Num');
  +        my $request_num =
  +          Apache::TestRequest::user_agent_request_num($res);
   
           return $request_num == $requests;
       }, 5;
  
  
  

Mime
View raw message