Skip to content

Commit bc0d909

Browse files
authored
Merge pull request #95 from Barfooss/fix-guzzle-stream-chunk-size
Added stream_set_chunk_size to the underlying stream in the parse()-function
2 parents 3b4cbe8 + ccf0f40 commit bc0d909

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Parser.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ public function parse(): void
146146

147147
while (!feof($this->stream) && !$eof) {
148148
$pos = ftell($this->stream);
149+
// set the underlying streams chunk size, so it delivers according to the request from stream_get_line
150+
stream_set_chunk_size($this->stream, $this->bufferSize);
149151
$line = stream_get_line($this->stream, $this->bufferSize, $this->lineEnding);
150152

151153
if (false === $line) {

0 commit comments

Comments
 (0)