protected function _parseApiReplyPrefillHeaders($headers, $reply)
  {
    if ($reply === '' && (isset($headers['Location']) || isset($headers['location']))) {
      $reply = [
        'Location' => isset($headers['Location']) ? $headers['Location'] : $headers['location']
      ];
      if (isset($headers['X-TON-Min-Chunk-Size'])) {
        $reply['X-TON-Min-Chunk-Size'] = $headers['X-TON-Min-Chunk-Size'];
      }
      if (isset($headers['X-TON-Max-Chunk-Size'])) {
        $reply['X-TON-Max-Chunk-Size'] = $headers['X-TON-Max-Chunk-Size'];
      }
      if (isset($headers['Range'])) {
        $reply['Range'] = $headers['Range'];
      }
      $reply = json_encode($reply);
    }
    return $reply;
  }
protected function _parseApiReplyPrefillHeaders($headers, $reply)
  {
    if ($reply === '' && (isset($headers['Location']) || isset($headers['location']))) {
      $reply = [
        'Location' => isset($headers['Location']) ? $headers['Location'] : $headers['location']
      ];
      if (isset($headers['X-TON-Min-Chunk-Size'])) {
        $reply['X-TON-Min-Chunk-Size'] = $headers['X-TON-Min-Chunk-Size'];
      }
      if (isset($headers['X-TON-Max-Chunk-Size'])) {
        $reply['X-TON-Max-Chunk-Size'] = $headers['X-TON-Max-Chunk-Size'];
      }
      if (isset($headers['Range'])) {
        $reply['Range'] = $headers['Range'];
      }
      $reply = json_encode($reply);
    }
    return $reply;
  }
protected function _parseApiReplyPrefillHeaders ( $ headers , $ reply ) { if ( $ reply === '' && ( isset ( $ headers [ 'Location' ] ) || isset ( $ headers [ 'location' ] ) ) ) { $ reply = [ 'Location' => isset ( $ headers [ 'Location' ] ) ? $ headers [ 'Location' ] : $ headers [ 'location' ] ] ; if ( isset ( $ headers [ 'X-TON-Min-Chunk-Size' ] ) ) { $ reply [ 'X-TON-Min-Chunk-Size' ] = $ headers [ 'X-TON-Min-Chunk-Size' ] ; } if ( isset ( $ headers [ 'X-TON-Max-Chunk-Size' ] ) ) { $ reply [ 'X-TON-Max-Chunk-Size' ] = $ headers [ 'X-TON-Max-Chunk-Size' ] ; } if ( isset ( $ headers [ 'Range' ] ) ) { $ reply [ 'Range' ] = $ headers [ 'Range' ] ; } $ reply = json_encode ( $ reply ) ; } return $ reply ; }
Parses the API headers to return Location and Ton API headers

@param array  $headers The headers list
@param string $reply   The actual HTTP body

@return string $reply
Parses the API headers to return Location and Ton API headers