iliaa Fri Jan 20 01:40:48 2006 UTC
Modified files:
/php-src/ext/standard http_fopen_wrapper.c
Log:
MFB51: Allow get_headers() to return header information even for non-200
responses.
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/http_fopen_wrapper.c?r1=1.108&r2=1.109&diff_format=u
Index: php-src/ext/standard/http_fopen_wrapper.c
diff -u php-src/ext/standard/http_fopen_wrapper.c:1.108
php-src/ext/standard/http_fopen_wrapper.c:1.109
--- php-src/ext/standard/http_fopen_wrapper.c:1.108 Sun Jan 1 13:09:55 2006
+++ php-src/ext/standard/http_fopen_wrapper.c Fri Jan 20 01:40:48 2006
@@ -19,7 +19,7 @@
| Sara Golemon <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: http_fopen_wrapper.c,v 1.108 2006/01/01 13:09:55 sniper Exp $ */
+/* $Id: http_fopen_wrapper.c,v 1.109 2006/01/20 01:40:48 iliaa Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -487,6 +487,10 @@
} else {
response_code = 0;
}
+ /* when we request only the header, don't fail even on
error codes */
+ if (options & STREAM_ONLY_GET_HEADERS) {
+ reqok = 1;
+ }
switch(response_code) {
case 200:
case 302:
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php