Open mattfysh opened 2 years ago
As a workaround I'm using:
class MultiValueMap extends Map {
set(key, value) {
let finalValue = value
if (key === 'WARC-Concurrent-To') {
const prev = this.get(key) || []
finalValue = [...prev, value]
}
super.set(key, finalValue)
}
}
const parser = new WARCParser(...)
parser._headersClass = MultiValueMap
Hey Ilya - in the spec a record can have multiple WARC-Concurrent-To fields, e.g.
https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/#warc-concurrent-to
However the parser is only allowing access to one of them. Is it possible to get
record.warcHeader('WARC-Concurrent-To')
to return an array of values?