Changeset View
Changeset View
Standalone View
Standalone View
src/parser/http/__tests__/PhutilHTTPResponseParserTestCase.php
Context not available. | |||||
} | } | ||||
// Submit the input in little bits to try to catch any weird parser bugs. | // Submit the input in little bits to try to catch any weird parser bugs. | ||||
$length = strlen($input); | $length = @strlen($input); | ||||
$pos = 0; | $pos = 0; | ||||
while ($pos < $length) { | while ($pos < $length) { | ||||
$next_len = mt_rand(1, 32); | $next_len = mt_rand(1, 32); | ||||
$piece = substr($input, $pos, $next_len); | $piece = @substr($input, $pos, $next_len); | ||||
$pos = $pos + $next_len; | $pos = $pos + $next_len; | ||||
$parser->readBytes($piece); | $parser->readBytes($piece); | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0