docstr: Returns the ``Content-Type`` header to be used for this request.
  From tornado.web.StaticFileHandler.
docstr_tok: ["Returns","the","``","Content-Type","``","header","to","be","used","for","this","request",".","From","tornado.web.StaticFileHandler","."]
code: def get_content_type(abspath) -> str:
      """Returns the ``Content-Type`` header to be used for this request.
      From tornado.web.StaticFileHandler.
      """
      mime_type, encoding = mimetypes.guess_type(abspath)
      # per RFC 6713, use the appropriate type for a gzip compressed file
      if encoding == "gzip":
          return "application/gzip"
      # As of 2015-07-21 there is no bzip2 encoding defined at
      # http://www.iana.org/assignments/media-types/media-types.xhtml
      # So for that (and any other encoding), use octet-stream.
      elif encoding is not None:
          return "application/octet-stream"
      elif mime_type is not None:
          return mime_type
      # if mime_type not detected, use application/octet-stream
      else:
          return "application/octet-stream"
  
file_path: streamlit/lib/streamlit/web/server/component_request_handler.py
imports: import mimetypes
  import os
  import tornado.web
  import streamlit.web.server.routes
  from streamlit.components.v1.components import ComponentRegistry
  from streamlit.logger import get_logger
label_desc: Use image node_id 6 for calling the ComponentRequestHandler obj's underlying member method code with example usage: obj.get_content_type(abspath) and returns: str, str, mime_type, str