diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2018-01-12 01:43:38 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2018-01-13 22:53:19 -0500 |
commit | dc1675ea329ae706597cd29f5bd2efb9948691aa (patch) | |
tree | 7cc73970ecee19c810ae8f7989bbc84768f707b1 /tests/request.t | |
parent | cb371557e56c281d311667eba88f66c1c81213dc (diff) | |
download | lighttpd-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-x | tests/request.t | 18 |
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 |