/** * Process response headers * * @param StreamInterface $stream */ protected function processResponseHeaders(StreamInterface $stream) { // Set the size on the stream if it was returned in the response foreach ($this->lastResponseHeaders as $header) { if (($pos = stripos($header, 'Content-Length:')) === 0) { $stream->setSize(trim(substr($header, 15))); } } }
protected function processResponseHeaders(StreamInterface $stream) { foreach ($this->lastResponseHeaders as $header) { if (stripos($header, 'Content-Length:') === 0) { $stream->setSize(trim(substr($header, 15))); } } }