From ac57b7078be58db990d90b853e113a492bdaea5a Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Sat, 16 May 2009 20:44:05 +0000 Subject: [PATCH] MFH: Minimal HTTP server to test HTTP stream wrapper --- ext/standard/tests/http/server.inc | 92 ++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 ext/standard/tests/http/server.inc 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); +} + +?> -- 2.50.1