--TEST-- Bug #69337 (Stream context leaks when http request fails) --SKIPIF-- --INI-- allow_url_fopen=1 allow_url_include=1 --FILE-- "stream_notification_callback")); $responses = array( "data://text/plain,HTTP/1.0 302 Found\r\nLocation: http://127.0.0.1:22345/try-again\r\n\r\n", "data://text/plain,HTTP/1.0 404 Not Found\r\n\r\n", ); $pid = http_server("tcp://127.0.0.1:22345", $responses, $output); $f = file_get_contents('http://127.0.0.1:22345/', 0, $ctx); http_server_kill($pid); var_dump($f); ?> ==DONE== --EXPECTF-- string(26) "HTTP/1.0 404 Not Found " ==DONE==