Skip to content

Commit

Permalink
Allow get_headers() to return header information even for non-200 res…
Browse files Browse the repository at this point in the history
…ponses.
  • Loading branch information
Ilia Alshanetsky committed Jan 20, 2006
1 parent c447acf commit 0621bcc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ext/standard/http_fopen_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0621bcc

Please sign in to comment.