summaryrefslogtreecommitdiffstats
path: root/bug69313.phpt
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-04-08 13:16:57 +0200
committerRemi Collet <fedora@famillecollet.com>2015-04-08 13:16:57 +0200
commit04cf9060785835e27da422a4e9a7620ea0b379a6 (patch)
treea26df79d93c2ea9141ca3ec67ed3f383db39e089 /bug69313.phpt
parentfd625bd2f9aaf79be4f0e5a4be6d492d52751564 (diff)
php-pecl-http: 2.4.3
Diffstat (limited to 'bug69313.phpt')
-rw-r--r--bug69313.phpt46
1 files changed, 46 insertions, 0 deletions
diff --git a/bug69313.phpt b/bug69313.phpt
new file mode 100644
index 0000000..824918c
--- /dev/null
+++ b/bug69313.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Bug #69313 (http\Client doesn't send GET body)
+--SKIPIF--
+<?php
+include "./skipif.inc";
+skip_client_test();
+?>
+--FILE--
+<?php
+
+
+include "helper/server.inc";
+
+echo "Test\n";
+
+server("proxy.inc", function($port, $stdin, $stdout, $stderr) {
+ $request = new http\Client\Request("GET", "http://localhost:$port/");
+ $request->setHeader("Content-Type", "text/plain");
+ $request->getBody()->append("foo");
+ $client = new http\Client();
+ $client->enqueue($request);
+ $client->send();
+ echo $client->getResponse();
+});
+
+?>
+
+Done
+--EXPECTF--
+Test
+HTTP/1.1 200 OK
+Accept-Ranges: bytes
+Etag: "%s"
+X-Original-Transfer-Encoding: chunked
+Content-Length: %d
+
+GET / HTTP/1.1
+User-Agent: %s
+Host: localhost:%d
+Accept: */*
+Content-Type: text/plain
+Content-Length: 3
+X-Original-Content-Length: 3
+
+foo
+Done