Skip to content

Commit

Permalink
Merge pull request #95 from Barfooss/fix-guzzle-stream-chunk-size
Browse files Browse the repository at this point in the history
Added stream_set_chunk_size to the underlying stream in the parse()-function
  • Loading branch information
gonzofy authored Jan 4, 2023
2 parents 3b4cbe8 + ccf0f40 commit bc0d909
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ public function parse(): void

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

if (false === $line) {
Expand Down

0 comments on commit bc0d909

Please sign in to comment.