WoltLab/WCF — pull request #1666 by SoftCreatR (2014-02-05 00:45:14+00:00)
Title: Add limit option

Adding a limit option allows to limit the reply body. By default, you have to download the complete resource, which may be unwanted behavior in some cases.

Example:

$request = new HTTPRequest('http://ipv4.download.thinkbroadband.com/1GB.zip', array('method' => 'GET', 'maxLength' => 100));
$request->execute();
$reply = $request->getReply();

Instead of downloading the whole 1GB file, it should just return the first 100 bytes in the reply body.