summaryrefslogtreecommitdiff
path: root/ext/zlib/zlib_fopen_wrapper.c
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2002-10-15 02:27:15 +0000
committerWez Furlong <wez@php.net>2002-10-15 02:27:15 +0000
commit94ef7bc81e9f0dcfb29a97905c7e69178bc80355 (patch)
tree07795c2f5dfe95ceebfe621d92b9514acda69a82 /ext/zlib/zlib_fopen_wrapper.c
parentbf51192d679d198c3f06968be895d74d015d81f0 (diff)
downloadphp-git-94ef7bc81e9f0dcfb29a97905c7e69178bc80355.tar.gz
Don't use streams-level buffer on zlib streams.
Diffstat (limited to 'ext/zlib/zlib_fopen_wrapper.c')
-rw-r--r--ext/zlib/zlib_fopen_wrapper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/zlib/zlib_fopen_wrapper.c b/ext/zlib/zlib_fopen_wrapper.c
index b97f6a691b..b7c5454a37 100644
--- a/ext/zlib/zlib_fopen_wrapper.c
+++ b/ext/zlib/zlib_fopen_wrapper.c
@@ -111,8 +111,10 @@ php_stream *php_stream_gzopen(php_stream_wrapper *wrapper, char *path, char *mod
self->gz_file = gzdopen(fd, mode);
if (self->gz_file) {
stream = php_stream_alloc_rel(&php_stream_gzio_ops, self, 0, mode);
- if (stream)
+ if (stream) {
+ stream->flags |= PHP_STREAM_FLAG_NO_BUFFER;
return stream;
+ }
gzclose(self->gz_file);
}
if (options & REPORT_ERRORS)