You are here

private function InflateStream::getLengthOfPossibleFilenameHeader in Auth0 Single Sign On 8.2

Parameters

StreamInterface $stream:

$header:

Return value

int

1 call to InflateStream::getLengthOfPossibleFilenameHeader()
InflateStream::__construct in vendor/guzzlehttp/psr7/src/InflateStream.php

File

vendor/guzzlehttp/psr7/src/InflateStream.php, line 38

Class

InflateStream
Uses PHP's zlib.inflate filter to inflate deflate or gzipped content.

Namespace

GuzzleHttp\Psr7

Code

private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header) {
  $filename_header_length = 0;
  if (substr(bin2hex($header), 6, 2) === '08') {

    // we have a filename, read until nil
    $filename_header_length = 1;
    while ($stream
      ->read(1) !== chr(0)) {
      $filename_header_length++;
    }
  }
  return $filename_header_length;
}