Skip to content

Commit 94ef7bc

Browse files
committed
Don't use streams-level buffer on zlib streams.
1 parent bf51192 commit 94ef7bc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ext/zlib/zlib_fopen_wrapper.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ php_stream *php_stream_gzopen(php_stream_wrapper *wrapper, char *path, char *mod
111111
self->gz_file = gzdopen(fd, mode);
112112
if (self->gz_file) {
113113
stream = php_stream_alloc_rel(&php_stream_gzio_ops, self, 0, mode);
114-
if (stream)
114+
if (stream) {
115+
stream->flags |= PHP_STREAM_FLAG_NO_BUFFER;
115116
return stream;
117+
}
116118
gzclose(self->gz_file);
117119
}
118120
if (options & REPORT_ERRORS)

0 commit comments

Comments
 (0)