summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSara Golemon <pollita@php.net>2003-02-08 01:36:52 +0000
committerSara Golemon <pollita@php.net>2003-02-08 01:36:52 +0000
commitbc517aaa2adb5647f9cf97e2a805d96b3ba107c0 (patch)
treedb29bbe43dd01b5da2af9f13335297d03382b860
parent9547f33a8e010cab1e9d45b08ed497a2d13430b9 (diff)
downloadphp-git-bc517aaa2adb5647f9cf97e2a805d96b3ba107c0.tar.gz
MFH(r-1.59)
-rw-r--r--ext/standard/http_fopen_wrapper.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c
index 4ae41fb93c..12482895b3 100644
--- a/ext/standard/http_fopen_wrapper.c
+++ b/ext/standard/http_fopen_wrapper.c
@@ -123,8 +123,7 @@ php_stream *php_stream_url_wrap_http(php_stream_wrapper *wrapper, char *path, ch
goto out;
/* avoid buffering issues while reading header */
- if (options & STREAM_WILL_CAST)
- chunk_size = php_stream_set_chunk_size(stream, 1);
+ chunk_size = php_stream_set_chunk_size(stream, 1);
php_stream_context_set(stream, context);
@@ -400,8 +399,8 @@ out:
if (stream) {
stream->wrapperdata = response_header;
php_stream_notify_progress_init(context, 0, file_size);
- if (options & STREAM_WILL_CAST)
- php_stream_set_chunk_size(stream, chunk_size);
+ /* Restore original chunk size now that we're done with headers */
+ php_stream_set_chunk_size(stream, chunk_size);
/* as far as streams are concerned, we are now at the start of
* the stream */
stream->position = 0;