From 8e51ddc544fef9bd89e27ac56d48e09c625d6303 Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Thu, 31 Mar 2016 12:40:19 -0700 Subject: [PATCH] archiveiterator: don't reuse entries when post-append, as they may be cached for merge -- can break if records do not alternate request/response fixes #175 --- pywb/warc/archiveiterator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pywb/warc/archiveiterator.py b/pywb/warc/archiveiterator.py index bc23e527..97bfc1a6 100644 --- a/pywb/warc/archiveiterator.py +++ b/pywb/warc/archiveiterator.py @@ -309,7 +309,10 @@ class DefaultRecordIter(object): else: entry = ArchiveIndexEntry() - self.entry_cache[rec_type] = entry + # don't reuse when using append post + # entry may be cached + if not self.options.get('append_post'): + self.entry_cache[rec_type] = entry return entry