cvs: php-src(PHP_5_1) /ext/standard http_fopen_wrapper.c
| From: | Ilia Alshanetsky | Date: | Fri, 20 Jan 2006 01:40:32 +0000 |
| Subject: | cvs: php-src(PHP_5_1) /ext/standard http_fopen_wrapper.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-36579@lists.php.net to get a copy of this message | ||
iliaa Fri Jan 20 01:40:32 2006 UTC
Modified files: (Branch: PHP_5_1)
/php-src/ext/standard http_fopen_wrapper.c
Log:
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.99.2.8&r2=1.99.2.9&diff_format=u
Index: php-src/ext/standard/http_fopen_wrapper.c
diff -u php-src/ext/standard/http_fopen_wrapper.c:1.99.2.8
php-src/ext/standard/http_fopen_wrapper.c:1.99.2.9
--- php-src/ext/standard/http_fopen_wrapper.c:1.99.2.8 Sun Jan 1 12:50:14 2006
+++ php-src/ext/standard/http_fopen_wrapper.c Fri Jan 20 01:40:32 2006
@@ -19,7 +19,7 @@
| Sara Golemon <pollita@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: http_fopen_wrapper.c,v 1.99.2.8 2006/01/01 12:50:14 sniper Exp $ */
+/* $Id: http_fopen_wrapper.c,v 1.99.2.9 2006/01/20 01:40:32 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: