From 4a29f773f96c7f8ad76aebe732be7a8b1ad2c4e0 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 16 Feb 2015 13:34:32 +0100 Subject: [PATCH] test++ --- tests/client026.phpt | 50 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 tests/client026.phpt diff --git a/tests/client026.phpt b/tests/client026.phpt new file mode 100644 index 0000000..d946a2c --- /dev/null +++ b/tests/client026.phpt @@ -0,0 +1,50 @@ +--TEST-- +client stream 128M +--SKIPIF-- + +--FILE-- +setContentType("application/octet-stream"); + for ($i = 0, $data = str_repeat("a",1024); $i < 128*1024; ++$i) { + $request->getBody()->append($data); + } + $request->setOptions(["expect_100_timeout" => 0]); + $client->enqueue($request); + $client->send(); + var_dump($client->getResponse()->getHeaders()); +}); + +?> +===DONE=== +--EXPECTF-- +Test +array(5) { + ["Accept-Ranges"]=> + string(5) "bytes" + ["Etag"]=> + string(%d) "%s" + ["Last-Modified"]=> + string(%d) "%s" + ["X-Original-Transfer-Encoding"]=> + string(7) "chunked" + ["Content-Length"]=> + int(134217973) +} +exception 'http\Exception\BadMessageException' with message 'Empty message received from stream' in %sproxy.inc:%d +Stack trace: +#0 %sproxy.inc(%d): http\Message->__construct(Resource id #%d, false) +#1 %sserver.inc(%d): {closure}(Resource id #%d) +#2 %sproxy.inc(%d): serve(Object(Closure)) +#3 {main} +===DONE=== -- 2.30.2