You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2017/09/13 10:40:31 UTC
svn commit: r1808226 - in /httpd/test/framework/trunk/t:
htdocs/apache/chunked/flushheap0.html http11/clength.t
Author: jorton
Date: Wed Sep 13 10:40:31 2017
New Revision: 1808226
URL: http://svn.apache.org/viewvc?rev=1808226&view=rev
Log:
Add some tests to ensure C-L is generated in simple responses.
Added:
httpd/test/framework/trunk/t/htdocs/apache/chunked/flushheap0.html (with props)
httpd/test/framework/trunk/t/http11/clength.t
Added: httpd/test/framework/trunk/t/htdocs/apache/chunked/flushheap0.html
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/htdocs/apache/chunked/flushheap0.html?rev=1808226&view=auto
==============================================================================
Binary file - no diff available.
Propchange: httpd/test/framework/trunk/t/htdocs/apache/chunked/flushheap0.html
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: httpd/test/framework/trunk/t/http11/clength.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/http11/clength.t?rev=1808226&view=auto
==============================================================================
--- httpd/test/framework/trunk/t/http11/clength.t (added)
+++ httpd/test/framework/trunk/t/http11/clength.t Wed Sep 13 10:40:31 2017
@@ -0,0 +1,27 @@
+use strict;
+use warnings FATAL => 'all';
+
+use Apache::Test;
+use Apache::TestUtil;
+use Apache::TestRequest;
+
+my %tests = (
+ "/foobar.html" => "foobar",
+ # flushheap0 inserts a single FLUSH bucket after the content, before EOS
+ "/apache/chunked/flushheap0.html" => "bbbbbbbbbb",
+ );
+
+plan tests => 3*scalar keys %tests, need 'bucketeer';
+
+Apache::TestRequest::user_agent(keep_alive => 1);
+
+foreach my $path (sort keys %tests) {
+ my $expected = $tests{$path};
+ my $r = GET($path);
+
+ ok t_cmp($r->code, 200, "successful response");
+
+ ok t_cmp($r->header("Content-Length"), length $expected);
+
+ ok t_cmp($r->content, $expected);
+}