cvs: php-src /ext/standard http_fopen_wrapper.c
| From: | Sara Golemon | Date: | Mon, 05 Nov 2007 00:47:21 +0000 |
| Subject: | cvs: php-src /ext/standard http_fopen_wrapper.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-46932@lists.php.net to get a copy of this message | ||
pollita Mon Nov 5 00:47:21 2007 UTC
Modified files:
/php-src/ext/standard http_fopen_wrapper.c
Log:
Allow http fopen wrapper to fetch content on 'error' condition (David Zulke)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/http_fopen_wrapper.c?r1=1.128&r2=1.129&diff_format=u
Index: php-src/ext/standard/http_fopen_wrapper.c
diff -u php-src/ext/standard/http_fopen_wrapper.c:1.128
php-src/ext/standard/http_fopen_wrapper.c:1.129
--- php-src/ext/standard/http_fopen_wrapper.c:1.128 Sun Sep 30 05:43:28 2007
+++ php-src/ext/standard/http_fopen_wrapper.c Mon Nov 5 00:47:21 2007
@@ -19,7 +19,7 @@
| Sara Golemon <pollita@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: http_fopen_wrapper.c,v 1.128 2007/09/30 05:43:28 jani Exp $ */
+/* $Id: http_fopen_wrapper.c,v 1.129 2007/11/05 00:47:21 pollita Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -544,7 +544,8 @@
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) {