WoltLab/WCF — pull request #1665 by SoftCreatR (2014-02-04 23:52:31+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', 'limit' => 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.