Bugfix: chunked response error for #79

This commit is contained in:
djmaze 2021-04-12 14:38:13 +02:00
parent bc36b10348
commit c5d4e5f395

View file

@ -148,6 +148,7 @@ class Socket extends \SnappyMail\HTTP\Request
\fwrite($this->stream, $tmp); \fwrite($this->stream, $tmp);
$chunk -= \strlen($tmp); $chunk -= \strlen($tmp);
} }
"\r\n" === \fread($sock, 2);
} else { } else {
\fwrite($this->stream, \fread($sock, 1024)); \fwrite($this->stream, \fread($sock, 1024));
} }
@ -163,6 +164,7 @@ class Socket extends \SnappyMail\HTTP\Request
$body .= $tmp; $body .= $tmp;
$chunk -= \strlen($tmp); $chunk -= \strlen($tmp);
} }
"\r\n" === \fread($sock, 2);
} else { } else {
$body .= \fread($sock, 1024); $body .= \fread($sock, 1024);
} }