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 st...@apache.org on 2004/03/23 21:50:41 UTC

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

stoddard    2004/03/23 12:50:41

  Modified:    perl-framework/t/apache chunkinput.t
  Log:
  adjust for 1.3 fooness in handling this test case
  
  Revision  Changes    Path
  1.4       +18 -5     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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- chunkinput.t	8 Oct 2002 23:28:39 -0000	1.3
  +++ chunkinput.t	23 Mar 2004 20:50:41 -0000	1.4
  @@ -12,11 +12,24 @@
                       "/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",
  -                   );
  +# Apache 2.0 handles this test more correctly than Apache 1.3. 
  +# 1.3 returns 400 Bad Request in this case and it is not worth 
  +# changing 1.3s behaviour.
  +my @resp_strings;
  +if (have_apache(1)) {
  +   @resp_strings = ("HTTP/1.1 200 OK",
  +                       "HTTP/1.1 404 Not Found",
  +		       "HTTP/1.1 400 Bad Request",
  +		       "HTTP/1.1 400 Bad Request",
  +		       );
  +} 
  +else {
  +   @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 = 4 * @test_strings + 1;
   my $vars = Apache::Test::vars();
  
  
  

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

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> The analysis of the problem pointed to by the url above looks right to
> me. I came to the same conclusion, that 1.3 and 2.0 are fundamentally
> different in how they handle/respond to chunked request bodies. 1.3 is
> not going to change so may as well work around it. I am not a perl
> programmer, so +1 "in concept" to the limits.t patch.

cool, thanks for the review/assurance.  committed.

--Geoff


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

Posted by Bill Stoddard <bi...@wstoddard.com>.
Geoffrey Young wrote:

> 
> stoddard@apache.org wrote:
> 
>>stoddard    2004/03/23 12:50:41
>>
>>  Modified:    perl-framework/t/apache chunkinput.t
>>  Log:
>>  adjust for 1.3 fooness in handling this test case
> 
> 
> hi
> 
> since you seem to understand chunked foo, care to take a look at this?
> 
>   http://marc.theaimsgroup.com/?l=apache-test-dev&m=107108438330280&w=2
> 
> I still see 1.3 failing on t/apache/limit.t without that patch, but I wanted
> to be sure that the change is warranted before committing.
> 
> thanks
> 
> --Geoff

The analysis of the problem pointed to by the url above looks right to me. I came to the same conclusion, that 
1.3 and 2.0 are fundamentally different in how they handle/respond to chunked request bodies. 1.3 is not going 
to change so may as well work around it. I am not a perl programmer, so +1 "in concept" to the limits.t patch.

Bill


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

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

stoddard@apache.org wrote:
> stoddard    2004/03/23 12:50:41
> 
>   Modified:    perl-framework/t/apache chunkinput.t
>   Log:
>   adjust for 1.3 fooness in handling this test case

hi

since you seem to understand chunked foo, care to take a look at this?

  http://marc.theaimsgroup.com/?l=apache-test-dev&m=107108438330280&w=2

I still see 1.3 failing on t/apache/limit.t without that patch, but I wanted
to be sure that the change is warranted before committing.

thanks

--Geoff