httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: httpd-test/perl-framework/t/apache chunkinput.t
Date Mon, 03 Jun 2002 07:23:30 GMT
jerenkrantz    2002/06/03 00:23:30

  Modified:    perl-framework/t/apache chunkinput.t
  Log:
  Add a bogus URI to ensure that code works correctly in the 404 case and
  in the 413 case.
  
  Revision  Changes    Path
  1.2       +16 -4     httpd-test/perl-framework/t/apache/chunkinput.t
  
  Index: chunkinput.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/apache/chunkinput.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- chunkinput.t	3 Jun 2002 07:12:16 -0000	1.1
  +++ chunkinput.t	3 Jun 2002 07:23:30 -0000	1.2
  @@ -5,10 +5,20 @@
   use Apache::TestUtil;
   use Apache::TestRequest ();
   
  -my @test_strings = ("0","AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",);
  -my @resp_strings = ("HTTP/1.1 200 OK","HTTP/1.1 413 Request Entity Too Large",);
  +my @test_strings = ("0",
  +                    "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
  +                    );
  +my @req_strings =  ("/echo_post_chunk",
  +                    "/i_do_not_exist_in_your_wildest_imagination");
  +
  +# This is expanded out.
  +my @resp_strings = ("HTTP/1.1 200 OK",
  +                    "HTTP/1.1 404 Not Found",
  +                    "HTTP/1.1 413 Request Entity Too Large",
  +                    "HTTP/1.1 413 Request Entity Too Large",
  +                   );
   
  -my $tests = 2 * @test_strings + 1;
  +my $tests = 4 * @test_strings + 1;
   my $vars = Apache::Test::vars();
   my $module = 'default';
   my $cycle = 0;
  @@ -18,12 +28,13 @@
   print "testing $module\n";
   
   for my $data (@test_strings) {
  +  for my $request_uri (@req_strings) {
       my $sock = Apache::TestRequest::vhost_socket($module);
       ok $sock;
   
       Apache::TestRequest::socket_trace($sock);
   
  -    $sock->print("POST /echo_post_chunk HTTP/1.0\n");
  +    $sock->print("POST $request_uri HTTP/1.0\n");
       $sock->print("Transfer-Encoding: chunked\n");
       $sock->print("\n");
       $sock->print("$data\n");
  @@ -45,4 +56,5 @@
           chomp($response = Apache::TestRequest::getline($sock));
           ok t_cmp("$$", $response, "trailer (pid)");
       }
  +  }
   }
  
  
  

Mime
View raw message