mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
Extract WARC field "WARC-Identified-Payload-Type" (#251)
and add it as field "mime-detected" to index entry
This commit is contained in:
parent
54b265aaa8
commit
09295747b7
@ -265,6 +265,9 @@ class DefaultRecordParser(object):
|
||||
entry.extract_mime(record.http_headers.
|
||||
get_header('Content-Type'),
|
||||
def_mime)
|
||||
# detected mime from WARC-Identified-Payload-Type
|
||||
entry['mime-detected'] = record.rec_headers.get_header(
|
||||
'WARC-Identified-Payload-Type')
|
||||
|
||||
# status -- only for response records (by convention):
|
||||
if record.rec_type == 'response' and not self.options.get('minimal'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user