httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestClient.pm
Date Fri, 06 Jun 2003 01:46:13 GMT
stas        2003/06/05 18:46:13

  Modified:    perl-framework/Apache-Test Changes
               perl-framework/Apache-Test/lib/Apache TestClient.pm
  Log:
  response header() method is no longer case-sensitive
  
  Revision  Changes    Path
  1.26      +2 -1      httpd-test/perl-framework/Apache-Test/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Changes,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- Changes	6 Jun 2003 01:29:01 -0000	1.25
  +++ Changes	6 Jun 2003 01:46:13 -0000	1.26
  @@ -8,7 +8,8 @@
   
   =item 1.03-dev - 
   
  -Apache::TestClient now handles correctly responses with no body [Stas]
  +Apache::TestClient now handles correctly responses with no body and
  +its response header() method is no longer case-sensitive [Stas]
   
   add skip helper shortcuts: have_min_perl_version,
   have_min_module_version [Stas]
  
  
  
  1.6       +3 -3      httpd-test/perl-framework/Apache-Test/lib/Apache/TestClient.pm
  
  Index: TestClient.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestClient.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestClient.pm	6 Jun 2003 01:29:01 -0000	1.5
  +++ TestClient.pm	6 Jun 2003 01:46:13 -0000	1.6
  @@ -74,7 +74,7 @@
               $response_line = 1;
           }
           elsif (/^([a-zA-Z0-9_\-]+)\s*:\s*(.*?)$eol/o) {
  -            $res->{headers}->{$1} = $2;
  +            $res->{headers}->{lc $1} = $2;
           }
           elsif (/^$eol$/o) {
               $header_term = 1;
  @@ -114,7 +114,7 @@
   
   sub header {
       my($self, $key) = @_;
  -    $self->{headers}->{$key};
  +    $self->{headers}->{lc $key};
   }
   
   my @headers = qw(Last-Modified Content-Type);
  @@ -122,7 +122,7 @@
   for my $header (@headers) {
       no strict 'refs';
       (my $method = lc $header) =~ s/-/_/g;
  -    *$method = sub { shift->{headers}->{$header} };
  +    *$method = sub { shift->{headers}->{lc $header} };
   }
   
   sub is_success {
  
  
  

Mime
View raw message