]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
test365: verify response with chunked AND Content-Length headers
authorDaniel Stenberg <daniel@haxx.se>
Mon, 30 Aug 2021 20:45:15 +0000 (22:45 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 31 Aug 2021 08:04:03 +0000 (10:04 +0200)
tests/data/Makefile.inc
tests/data/test365 [new file with mode: 0644]

index 7e915c0c1acf938f7ee9c0ed020e7f32f725264c..1aff37d246d2b74a97104f0ed56de541d94a66cd 100644 (file)
@@ -60,7 +60,7 @@ test325 test326 test327 test328 test329 test330 test331 test332 test333 \
 test334 test335 test336 test337 test338 test339 test340 test341 test342 \
 test343 test344 test345 test346 test347 test348 test349 test350 test351 \
 test352 test353 test354 test355 test356 test357 test358 test359 test360 \
-test361 test362 test363 test364 \
+test361 test362 test363 test364 test365 \
 \
 test392 test393 test394 test395 test396 test397 \
 \
diff --git a/tests/data/test365 b/tests/data/test365
new file mode 100644 (file)
index 0000000..add760f
--- /dev/null
@@ -0,0 +1,65 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+Chunked
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 123456
+Transfer-Encoding: chunked
+Content-Type: text/html
+Funny-head: yesyes
+
+10\r
+chunked data fun\r
+0\r
+\r
+</data>
+<datacheck nonewline="yes">
+HTTP/1.1 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 123456
+Transfer-Encoding: chunked
+Content-Type: text/html
+Funny-head: yesyes
+
+chunked data fun
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP/1.1 with chunked AND Content-Length headers
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>