mini\Dispatcher\HttpDispatcher::resolveBodySize()
Method
private
Signature
private function resolveBodySize(Psr\Http\Message\ResponseInterface $response, Psr\Http\Message\StreamInterface $body): ?int
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$response |
Psr\Http\Message\ResponseInterface |
required | Documentation missing |
$body |
Psr\Http\Message\StreamInterface |
required | Documentation missing |
Returns
?int
Documentation
Resolve body size in bytes, preferring the Content-Length header set by the application, falling back to the stream's reported size. Returns null when the size is not known — in that case the dispatcher streams until EOF and cannot honor Range requests.