Regression in Accesspoint

Description

In commit https://github.com/internetarchive/wayback/commit/1d2c39de0062653df678bcb0eef82099c69ddb77 a change was made to to AccessPoint at line 728 that seems to break certain older content.

In old ARC files, the timestamp is sometimes shorter (e.g. 200012051512) and thus the equals fails because the wbRequest timestamp has an extra 00 at its end.

Can be solved rewriting the condition as:

if (!wbRequest.getReplayTimestamp().startsWith(closest.getCaptureTimestamp())) {

It is semantically identical if both timestamps are of equal length while allowing the 'closest' timestamp to be less precise.

Alternatively, you could check the timestamp of 'closest' and, if shorter than expected, pad up with zeroes and then match.

Environment

None

Status

Assignee

Unassigned

Reporter

Kristinn Sigur├░sson

Labels

None

Group Assignee

None

ZendeskID

None

Estimated Difficulty

None

Actual Difficulty

None

Components

Priority

Major
Configure