X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fproxy002.phpt;fp=tests%2Fproxy002.phpt;h=86bee615c8570aa53b582e2f54a7e335549716c5;hb=22d8bd9cce8969e37269f1e817da0904a6af522c;hp=0000000000000000000000000000000000000000;hpb=db0ebb809983eb3dbda84dee61dfceb08feb20c3;p=m6w6%2Fext-http diff --git a/tests/proxy002.phpt b/tests/proxy002.phpt new file mode 100644 index 0000000..86bee61 --- /dev/null +++ b/tests/proxy002.phpt @@ -0,0 +1,44 @@ +--TEST-- +proxy - don't send proxy headers for a standard request +--SKIPIF-- + +--FILE-- +setOptions(array( + "timeout" => 3, + "proxyheader" => array("Hello" => "there!"), + )); + try { + $c->enqueue($r)->send(); + } catch (Exception $e) { + echo $e; + } + echo $c->getResponse()->getBody(); + while (!feof($pipes[1])) { + echo fgets($pipes[1]); + } + unset($r, $client); +} +?> +===DONE=== +--EXPECTF-- +Test +Server on port %d +GET / HTTP/1.1 +User-Agent: PECL_HTTP/%s PHP/%s libcurl/%s +Host: localhost:%d +Accept: */* +Content-Length: 0 +===DONE===