original_string: protected function parseMimeType($path, array $headers)
      {
          if (isset($headers['content-type'])) {
              list($mimetype) = explode(';', $headers['content-type'], 2);
  
              return trim($mimetype);
          }
  
          // Remove any query strings or fragments.
          list($path) = explode('#', $path, 2);
          list($path) = explode('?', $path, 2);
  
          return MimeType::detectByFilename($path);
      }
code: protected function parseMimeType($path, array $headers)
      {
          if (isset($headers['content-type'])) {
              list($mimetype) = explode(';', $headers['content-type'], 2);
  
              return trim($mimetype);
          }
  
          // Remove any query strings or fragments.
          list($path) = explode('#', $path, 2);
          list($path) = explode('?', $path, 2);
  
          return MimeType::detectByFilename($path);
      }
code_tokens: protected function parseMimeType ( $ path , array $ headers ) { if ( isset ( $ headers [ 'content-type' ] ) ) { list ( $ mimetype ) = explode ( ';' , $ headers [ 'content-type' ] , 2 ) ; return trim ( $ mimetype ) ; } // Remove any query strings or fragments. list ( $ path ) = explode ( '#' , $ path , 2 ) ; list ( $ path ) = explode ( '?' , $ path , 2 ) ; return MimeType :: detectByFilename ( $ path ) ; }
docstring: Parses the mimetype out of response headers.
  
  @param string $path
  @param array  $headers
  
  @return string
docstring_tokens: Parses the mimetype out of response headers .