--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-- Warning: file_get_contents(http://127.0.0.1:22345/): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found%ain %s on line %d bool(false) ==DONE==