From e551910f8a6a6e7b781e44b0923b310f6e68c27c Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Tue, 13 Feb 2018 01:44:57 +0100 Subject: [PATCH] tests: new tests for http raw mode Test 319 checks proper raw mode data with non-chunked gzip transfer-encoded server data. Test 326 checks raw mode with chunked server data. Bug: #2303 Closes #2308 --- tests/data/Makefile.inc | 4 +-- tests/data/test319 | 57 +++++++++++++++++++++++++++++++++++ tests/data/test326 | 66 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 125 insertions(+), 2 deletions(-) create mode 100644 tests/data/test319 create mode 100644 tests/data/test326 diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc index 31d299942..34fdbfffb 100644 --- a/tests/data/Makefile.inc +++ b/tests/data/Makefile.inc @@ -55,8 +55,8 @@ test280 test281 test282 test283 test284 test285 test286 test287 test288 \ test289 test290 test291 test292 test293 test294 test295 test296 test297 \ test298 test299 test300 test301 test302 test303 test304 test305 test306 \ test307 test308 test309 test310 test311 test312 test313 test314 test315 \ -test316 test317 test318 test320 test321 test322 test323 test324 \ -test325 \ +test316 test317 test318 test319 test320 test321 test322 test323 test324 \ +test325 test326 \ test350 test351 test352 test353 test354 \ test393 test394 test395 \ \ diff --git a/tests/data/test319 b/tests/data/test319 new file mode 100644 index 000000000..6a61a143a --- /dev/null +++ b/tests/data/test319 @@ -0,0 +1,57 @@ + + + +HTTP +HTTP GET +compressed + + +# +# Server-side + + +SFRUUC8xLjEgMjAwIE9LDQpEYXRlOiBNb24sIDI5IE5vdiAyMDA0IDIxOjU2OjUzIEdNVA0KU2Vy +dmVyOiBBcGFjaGUvMS4zLjMxIChEZWJpYW4gR05VL0xpbnV4KSBtb2RfZ3ppcC8xLjMuMjYuMWEg +UEhQLzQuMy45LTEgbW9kX3NzbC8yLjguMjAgT3BlblNTTC8wLjkuN2QgbW9kX3BlcmwvMS4yOQ0K +Q29udGVudC1UeXBlOiB0ZXh0L2h0bWw7IGNoYXJzZXQ9SVNPLTg4NTktMQ0KVHJhbnNmZXItRW5j +b2Rpbmc6IGd6aXANCkNvbnRlbnQtTGVuZ3RoOiA0NA0KDQofiwgIeZ6rQQADbGFsYWxhAMvJzEtV +MORSyAHRRlwKEIYxFwAKAnFgGAAAAA== + + + +H4sICHmeq0EAA2xhbGFsYQDLycxLVTDkUsgB0UZcChCGMRcACgJxYBgAAAA= + + + + +# +# Client-side + + +libz + + +http + + +HTTP GET gzip transfer-encoded data in raw mode + + +http://%HOSTIP:%HTTPPORT/319 --raw + + + +# +# Verify data after the test has been "shot" + + +^User-Agent:.* + + +GET /319 HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +Accept: */* + + + + diff --git a/tests/data/test326 b/tests/data/test326 new file mode 100644 index 000000000..1a4aae5f9 --- /dev/null +++ b/tests/data/test326 @@ -0,0 +1,66 @@ + + + +HTTP +HTTP GET + + +# +# Server-side + + +HTTP/1.1 200 OK +Date: Mon, 29 Nov 2004 21:56:53 GMT +Server: Apache/1.3.31 (Debian GNU/Linux) mod_gzip/1.3.26.1a PHP/4.3.9-1 mod_ssl/2.8.20 OpenSSL/0.9.7d mod_perl/1.29 +Content-Type: text/html; charset=ISO-8859-1 +Transfer-Encoding: chunked + +18 +line 1 + line 2 + line 3 + +0 + + + + +18 +line 1 + line 2 + line 3 + +0 + + + + + +# +# Client-side + + +http + + +HTTP GET chunked data in raw mode + + +http://%HOSTIP:%HTTPPORT/326 --raw + + + +# +# Verify data after the test has been "shot" + + +^User-Agent:.* + + +GET /326 HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +Accept: */* + + + +