Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
If a CDX entry has a status that is an integer instead of a string (which is what ArchiveWeb.page currently generates) then pywb will blow up during replay:
This commit will guard against that by casting status int values to a str.
Motivation and Context
It would be useful to be able to unpack a WACZ file created with ArchiveWeb.page (or other tools) and have it playable in pywb by moving the WARC and CDXJ files into place. Currently this is not possible because WACZ uses an int for the CDXJ status, whereas pywb expects it to be a string in multiple places. In the spirit of the robustness principle this change will be lenient in what is accepted in CDXJ files by casting an int status value to a str.
Types of changes
Checklist: