summaryrefslogtreecommitdiff
path: root/ext/standard/http_fopen_wrapper.c
diff options
context:
space:
mode:
authorSara Golemon <pollita@php.net>2007-11-05 01:00:43 +0000
committerSara Golemon <pollita@php.net>2007-11-05 01:00:43 +0000
commitf75ae01f092d732f95697498ea4d399bea759a48 (patch)
tree0eb941597038b819eacbbacd47877d7a91851460 /ext/standard/http_fopen_wrapper.c
parent81a874710eea31ef7ed2e0c55a5fa23e5f05f424 (diff)
downloadphp-git-f75ae01f092d732f95697498ea4d399bea759a48.tar.gz
MFH: http/ignore_errors context option
Diffstat (limited to 'ext/standard/http_fopen_wrapper.c')
-rw-r--r--ext/standard/http_fopen_wrapper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c
index f3acdb2981..5ab7459700 100644
--- a/ext/standard/http_fopen_wrapper.c
+++ b/ext/standard/http_fopen_wrapper.c
@@ -501,7 +501,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) {