code: def head_on_file(self, file):
          
          response = HeadResponse()
          if (not os.path.isfile(file)):
              response.status_code = '404'
          else:
              response.status_code = '200'
              response.headers[
                  'last-modified'] = datetime_to_str(os.path.getmtime(file))
              response.headers['content-length'] = os.path.getsize(file)
          return(response)
docs: Mock up requests.head(..) response on local file.