summaryrefslogtreecommitdiff
path: root/tests/request.t
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2018-01-12 01:43:38 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2018-01-13 22:53:19 -0500
commitdc1675ea329ae706597cd29f5bd2efb9948691aa (patch)
tree7cc73970ecee19c810ae8f7989bbc84768f707b1 /tests/request.t
parentcb371557e56c281d311667eba88f66c1c81213dc (diff)
downloadlighttpd-git-dc1675ea329ae706597cd29f5bd2efb9948691aa.tar.gz
[core] fix POST with chunked request body (fixes #2854)
(thx the_jk) x-ref: "chunked transfer encoding in request body only works for tiny chunks" https://redmine.lighttpd.net/issues/2854
Diffstat (limited to 'tests/request.t')
-rwxr-xr-xtests/request.t18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/request.t b/tests/request.t
index 70f5ee5f..fd853bf2 100755
--- a/tests/request.t
+++ b/tests/request.t
@@ -8,7 +8,7 @@ BEGIN {
use strict;
use IO::Socket;
-use Test::More tests => 59;
+use Test::More tests => 60;
use LightyTest;
my $tf = LightyTest->new();
@@ -167,6 +167,22 @@ Connection: close
Content-Type: application/x-www-form-urlencoded
Transfer-Encoding: chunked
+10
+0123456789abcdef
+0
+
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'POST via Transfer-Encoding: chunked, two hex');
+
+$t->{REQUEST} = ( <<EOF
+POST /get-post-len.pl HTTP/1.1
+Host: www.example.org
+Connection: close
+Content-Type: application/x-www-form-urlencoded
+Transfer-Encoding: chunked
+
a
0123456789
0