diff options
author | Stefan Eissing <icing@apache.org> | 2023-05-19 14:17:44 +0200 |
---|---|---|
committer | Stefan Eissing <icing@apache.org> | 2023-05-19 14:17:44 +0200 |
commit | 14aa4f56d7bd4171e462622a4717d11847b83a83 (patch) | |
tree | a3c4fa45d2bdcba4892f0bba4ea3724119cecf30 /test | |
parent | mod_authnz_ldap.c: Make sure the authentication variables are set in (diff) | |
download | apache2-14aa4f56d7bd4171e462622a4717d11847b83a83.tar.xz apache2-14aa4f56d7bd4171e462622a4717d11847b83a83.zip |
*) mod_http2: avoid double chunked-encoding on internal redirects.
PR 66597 [Yann Ylavic, Stefan Eissing]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1909932 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r-- | test/modules/http2/htdocs/cgi/xxx/test.json | 1 | ||||
-rw-r--r-- | test/modules/http2/test_004_post.py | 22 |
2 files changed, 22 insertions, 1 deletions
diff --git a/test/modules/http2/htdocs/cgi/xxx/test.json b/test/modules/http2/htdocs/cgi/xxx/test.json new file mode 100644 index 0000000000..ceafd0a135 --- /dev/null +++ b/test/modules/http2/htdocs/cgi/xxx/test.json @@ -0,0 +1 @@ +{"name": "test.json"}
\ No newline at end of file diff --git a/test/modules/http2/test_004_post.py b/test/modules/http2/test_004_post.py index 2daa6ffdbb..295f989b88 100644 --- a/test/modules/http2/test_004_post.py +++ b/test/modules/http2/test_004_post.py @@ -18,7 +18,15 @@ class TestPost: @pytest.fixture(autouse=True, scope='class') def _class_scope(self, env): TestPost._local_dir = os.path.dirname(inspect.getfile(TestPost)) - H2Conf(env).add_vhost_cgi().install() + conf = H2Conf(env, extras={ + f'cgi.{env.http_tld}': [ + f'<Directory {env.server_docs_dir}/cgi/xxx>', + ' RewriteEngine On', + ' RewriteRule .* /proxy/echo.py [QSA]', + '</Directory>', + ] + }) + conf.add_vhost_cgi(proxy_self=True).install() assert env.apache_restart() == 0 def local_src(self, fname): @@ -179,3 +187,15 @@ class TestPost: assert src == filepart.get_payload(decode=True) post_and_verify("data-1k", []) + + def test_h2_004_41(self, env): + # reproduce PR66597, double chunked encoding on redirects + url = env.mkurl("https", "cgi", "/xxx/test.json") + r = env.curl_post_data(url, data="0123456789", options=[]) + assert r.exit_code == 0 + assert 200 <= r.response["status"] < 300 + assert r.response['body'] == b'0123456789' + r = env.curl_post_data(url, data="0123456789", options=["-H", "Content-Length:"]) + assert r.exit_code == 0 + assert 200 <= r.response["status"] < 300 + assert r.response['body'] == b'0123456789' |