X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=tests%2Fbug66388.phpt;h=df53d9c0c0d40570bc6ddcb0ab20ced21d73580e;hp=ac0bff336d4e9b39f6ed3a5cd4fe9a9f1142e19f;hb=b2f41a29a8e35559157619218e8978d4780c2f46;hpb=71404a21e0937944e47a760e8736905c75f903ea diff --git a/tests/bug66388.phpt b/tests/bug66388.phpt index ac0bff3..df53d9c 100644 --- a/tests/bug66388.phpt +++ b/tests/bug66388.phpt @@ -1,8 +1,10 @@ --TEST-- Bug #66388 (Crash on POST with Content-Length:0 and untouched body) --SKIPIF-- - --FILE-- 0 - ) -); -$client->enqueue($request); -echo $client->send()->getResponse()->getResponseCode(); +server("proxy.inc", function($port) { + $client = new Client(); + $request = new Request( + 'POST', + "http://localhost:$port/", + array( + 'Content-Length' => 0 + ) + ); + $client->setOptions(["timeout" => 30]); + $client->enqueue($request); + echo $client->send()->getResponse()->getResponseCode(); +}); ?> ===DONE=== ---EXPECT-- +--EXPECTF-- Test -401 +200 ===DONE===