code: def load_headers_and_payload(self, cdx, failed_files, cdx_loader):
          
          has_curr = (cdx['filename'] != '-')
          #has_orig = (cdx.get('orig.filename', '-') != '-')
          orig_f = cdx.get('orig.filename')
          has_orig = orig_f and orig_f != '-'
  
          # load headers record from cdx['filename'] unless it is '-' (rare)
          headers_record = None
          if has_curr:
              headers_record = self._resolve_path_load(cdx, False, failed_files)
  
          # two index lookups
          # Case 1: if mimetype is still warc/revisit
          if cdx.get('mime') == 'warc/revisit' and headers_record:
              payload_record = self._load_different_url_payload(cdx,
                                                                headers_record,
                                                                failed_files,
                                                                cdx_loader)
  
          # single lookup cases
          # case 2: non-revisit
          elif (has_curr and not has_orig):
              payload_record = headers_record
  
          # case 3: identical url revisit, load payload from orig.filename
          elif (has_orig):
              payload_record = self._resolve_path_load(cdx, True, failed_files)
  
          return headers_record, payload_record
docs: Resolve headers and payload for a given capture
          In the simple case, headers and payload are in the same record.
          In the case of revisit records, the payload and headers may be in
          different records.
  
          If the original has already been found, lookup original using
          orig. fields in cdx dict.
          Otherwise, call _load_different_url_payload() to get cdx index
          from a different url to find the original record.