php-http / message

HTTP Message related tools
http://php-http.org
MIT License
1.3k stars 42 forks source link

Lower buffer size, and use it in the getContents #26

Closed joelwurtz closed 8 years ago

joelwurtz commented 8 years ago

This is mainly to avoid too much nested call to the read method, as if we got a stream where the reads provide too few bytes (like 100) it will make a nested call to the read method for each part of the messages and will stop on a too muche nested call exception with xdebug.

Also there is no need to have more than 8192 as PHP already have a buffer with this size, so no performance issue.

dbu commented 8 years ago

:+1: