Skip to content

Commit

Permalink
Merge pull request #4727 from ms609/GlazerMann-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
GlazerMann authored Dec 11, 2024
2 parents 13223a1 + 0d4913b commit 2978e2c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion expandFns.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,17 @@ function interpret_doi_header(array $headers_test, string $doi): ?bool {
return true;
}
bot_debug_log('Got weird stuff for HDL: ' . echoable_doi($doi));
return null; // @codeCoverageIgnoreEnd
return null;
}
if (strpos($resp0, '302') !== false && strpos($resp1, '503') !== false && $resp2 === '') {
if (isset(NULL_DOI_LIST[$doi])) {
return false;
}
if (isset(NULL_DOI_BUT_GOOD[$doi])) {
return true;
}
bot_debug_log('Got two bad hops for HDL: ' . echoable_doi($doi));
return null;
}
if (stripos($resp0 . $resp1 . $resp2, '404 Not Found') !== false || stripos($resp0 . $resp1 . $resp2, 'HTTP/1.1 404') !== false) {
return false; // Bad
Expand Down

0 comments on commit 2978e2c

Please sign in to comment.