class_docstr: A stateful downloader to maintain a session to the website
      
class_docstr_tok: ["A","stateful","downloader","to","maintain","a","session","to","the","website"]
docstr: Given HTTP headers, return 'status' record to assess later if link content was changed
          
code: def get_status_from_headers(cls, headers):
      """Given HTTP headers, return 'status' record to assess later if link content was changed"""
      # used for quick checks for HTTP or S3?
      # TODO:  So we will base all statuses on this set? e.g. for Last-Modified if to be
      # mapping from field to its type converter
      HTTP_HEADERS_TO_STATUS = {
          "Content-Length": int,
          "Content-Disposition": str,
          "Last-Modified": rfc2822_to_epoch,
          "Url-Filename": str,
      }
      # Allow for webserver to return them in other casing
      HTTP_HEADERS_TO_STATUS_lower = {
          s.lower(): (s, t) for s, t in HTTP_HEADERS_TO_STATUS.items()
      }
      status = {}
      if headers:
          for header_key in headers:
              try:
                  k, t = HTTP_HEADERS_TO_STATUS_lower[
                      header_key.lower()
                  ]
              except KeyError:
                  continue
              status[k] = t(headers[header_key])
  
      # convert to FileStatus
      return FileStatus(
          size=status.get("Content-Length"),
          mtime=status.get("Last-Modified"),
          filename=get_response_disposition_filename(
              status.get("Content-Disposition")
          )
          or status.get("Url-Filename"),
      )
  
imports: import re
  import requests
  import requests.auth
  from requests.utils import parse_dict_header
  import io
  from time import sleep
  from ..None import __version__
  from ..utils import ensure_list_from_str, ensure_dict_from_str, ensure_bytes
  from ..dochelpers import borrowkwargs
  from ..ui import ui
  from ..utils import auto_repr
  from ..support.network import get_url_filename
  from ..support.network import get_response_disposition_filename
  from ..support.network import rfc2822_to_epoch
  from ..support.cookies import cookies_db
  from ..support.status import FileStatus
  from ..support.exceptions import AccessDeniedError, AccessFailedError, CapturedException, DownloadError, UnhandledRedirectError
  from .base import Authenticator
  from .base import BaseDownloader, DownloaderSession
  from logging import getLogger
  from ..log import LoggerHelper
label_desc: Use image node_id 4 for calling the HTTPDownloader obj's underlying member method code with example usage: obj.get_status_from_headers(cls, headers) and returns: FileStatus