From 802aa5ae27ce755b94477976397502dc056227c4 Mon Sep 17 00:00:00 2001 From: Balazs Kovacsics Date: Mon, 22 Jul 2019 14:37:37 +0200 Subject: HTTP: use chunked Transfer-Encoding for HTTP_POST if size unknown If using the read callback for HTTP_POST, and POSTFIELDSIZE is not set, automatically add a Transfer-Encoding: chunked header, same as it is already done for HTTP_PUT, HTTP_POST_FORM and HTTP_POST_MIME. Update test 1514 according to the new behaviour. Closes #4138 --- tests/data/test1514 | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'tests/data') diff --git a/tests/data/test1514 b/tests/data/test1514 index 38f5da61f..6c09ae3b0 100644 --- a/tests/data/test1514 +++ b/tests/data/test1514 @@ -4,13 +4,14 @@ HTTP HTTP POST Content-Length +chunked Transfer-Encoding # Server-side -HTTP/1.1 411 Length Required +HTTP/1.1 200 OK Date: Sun, 19 Jan 2014 18:50:58 GMT Server: test-server/fake swsclose Connection: close @@ -36,13 +37,27 @@ http://%HOSTIP:%HTTPPORT/1514 # Verify data after the test has been "shot" # Content-Length header is not present +# Transfer-Encoding header is added automatically POST /1514 HTTP/1.1 Host: %HOSTIP:%HTTPPORT Accept: */* +Transfer-Encoding: chunked Content-Type: application/x-www-form-urlencoded Expect: 100-continue +1 +d +1 +u +1 +m +1 +m +1 +y +0 + -- cgit v1.2.3