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 <[EMAIL PROTECTED]>                              |
    +----------------------------------------------------------------------+
  */
-/* $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) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to