From: Arnaud Le Blanc Date: Sat, 16 May 2009 20:44:05 +0000 (+0000) Subject: MFH: Minimal HTTP server to test HTTP stream wrapper X-Git-Tag: php-5.3.0RC3~238 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ac57b7078be58db990d90b853e113a492bdaea5a;p=php MFH: Minimal HTTP server to test HTTP stream wrapper --- diff --git a/ext/standard/tests/http/server.inc b/ext/standard/tests/http/server.inc new file mode 100644 index 0000000000..b9ade0e9f0 --- /dev/null +++ b/ext/standard/tests/http/server.inc @@ -0,0 +1,92 @@ + 0) { + stream_copy_to_stream($sock, $output, $content_length); + } + + // send response + + $fd = fopen($file, 'rb'); + stream_copy_to_stream($fd, $sock); + + fclose($sock); + } + + exit(0); +} + +function http_server_kill($pid) { + posix_kill($pid, SIGTERM); + pcntl_waitpid($pid, $status); +} + +?>