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 br...@apache.org on 2002/09/02 02:44:31 UTC
cvs commit: httpd-test/perl-framework/t/http11 chunked.t
brianp 2002/09/01 17:44:31
Modified: perl-framework/t/http11 chunked.t
Log:
The chunked output tests no longer require a content-length in
non-chunked responses. (But if there is a C-L and it doesn't
match the expected value, the tests still report it as an error.)
Apache 2.0 used to always send a C-L header on non-chunked responses,
but as of 2.0.41-dev it omits the C-L on responses that would otherwise
require output buffering. (This new behavior of 2.0.41 is still compliant
with RFC 2616 section 14.13, in which the requirement for a C-L
is a SHOULD rather than a MUST.)
Revision Changes Path
1.16 +2 -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.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- chunked.t 1 Apr 2002 19:45:55 -0000 1.15
+++ chunked.t 2 Sep 2002 00:44:31 -0000 1.16
@@ -91,14 +91,14 @@
);
my $enc = $res->header('Transfer-Encoding') || '';
- my $ct = $res->header('Content-Length') || 0;
+ my $ct = $res->header('Content-Length') || '';
ok !t_cmp("chunked",
$enc,
"no Transfer-Encoding (test result inverted)"
);
- ok t_cmp($content_length,
+ ok t_cmp((($ct eq '') ? $ct : $content_length),
$ct,
"content length"
);