1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 00:48:25 +02:00

MFB51: Allow get_headers() to return header information even for non-200

responses.
This commit is contained in:
Ilia Alshanetsky
2006-01-20 01:40:48 +00:00
parent 04ad1d1462
commit dd68ac4c8c
+4
View File
@@ -487,6 +487,10 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
} 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: