From c1d31117493a4094263420f8840469daf2a9420f Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Mon, 5 Nov 2007 00:47:21 +0000 Subject: [PATCH] Allow http fopen wrapper to fetch content on 'error' condition (David Zulke) --- ext/standard/http_fopen_wrapper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index fa7bc97fa3..849eb99ebf 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -544,7 +544,8 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path, response_code = 0; } /* when we request only the header, don't fail even on error codes */ - if (options & STREAM_ONLY_GET_HEADERS) { + if ((options & STREAM_ONLY_GET_HEADERS) || + (php_stream_context_get_option(context, "http", "ignore_errors", &tmpzval) == SUCCESS && zend_is_true(*tmpzval)) ) { reqok = 1; } switch(response_code) { -- 2.50.1