diff --git a/wayback-cdx-server/src/main/java/org/archive/cdxserver/processor/DupeTimestampBestStatusFilter.java b/wayback-cdx-server/src/main/java/org/archive/cdxserver/processor/DupeTimestampBestStatusFilter.java index f491dceb54..16f3a72815 100644 --- a/wayback-cdx-server/src/main/java/org/archive/cdxserver/processor/DupeTimestampBestStatusFilter.java +++ b/wayback-cdx-server/src/main/java/org/archive/cdxserver/processor/DupeTimestampBestStatusFilter.java @@ -85,7 +85,8 @@ protected boolean include(CDXLine line) { String timestamp = line.getTimestamp(); timestamp = timestamp.substring(0, Math.min(timestampDedupLength, timestamp.length())); - int httpCode = NumberUtils.toInt(line.getStatusCode(), WORST_HTTP_CODE); + final String statusCode = line.getStatusCode(); + int httpCode = "-".equals(statusCode) ? WORST_HTTP_CODE : NumberUtils.toInt(statusCode, WORST_HTTP_CODE); boolean isDupe = false;