You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-cvs@httpd.apache.org by ge...@apache.org on 2004/03/24 01:36:28 UTC

cvs commit: httpd-test/perl-framework/t/apache limits.t

geoff       2004/03/23 16:36:28

  Modified:    perl-framework/t/apache limits.t
  Log:
  limit errors with chunked request bodies get 400 in 1.3 not 413 as with 2.0
  
  Revision  Changes    Path
  1.13      +11 -1     httpd-test/perl-framework/t/apache/limits.t
  
  Index: limits.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/apache/limits.t,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- limits.t	9 May 2002 07:14:36 -0000	1.12
  +++ limits.t	24 Mar 2004 00:36:27 -0000	1.13
  @@ -59,11 +59,13 @@
   my $subtests = (@conditions * 2) + 2;
   plan tests => $subtests, \&have_lwp;
   
  +use vars qw($expected_rc);
  +
   my $testnum = 1;
   foreach my $cond (@conditions) {
       foreach my $goodbad (qw(succeed fail)) {
           my $param = $params{"$cond-$goodbad"};
  -        my $expected_rc = $xrcs{"$cond-$goodbad"};
  +        $expected_rc = $xrcs{"$cond-$goodbad"};
           my $resp;
           if ($cond eq 'fieldcount') {
               my %fields;
  @@ -109,6 +111,14 @@
                           $req->header('X-Subtest' => $testnum);
                           $req->content(chunk_it($param));
                           $resp = Apache::TestRequest::user_agent->request($req);
  +
  +                        # limit errors with chunked request bodies get
  +                        # 400 with 1.3, not 413 - see special chunked
  +                        # request handling in ap_get_client_block in 1.3
  +
  +                        local $expected_rc = 400 if $goodbad eq 'fail' &&
  +                                                    have_apache(1); 
  +
                           ok t_cmp($expected_rc,
                                    $resp->code,
                                    "Test #$testnum");