Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deal with 10.4324/9781315875798-18 #4727

Merged
merged 6 commits into from
Dec 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion expandFns.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,17 @@
return true;
}
bot_debug_log('Got weird stuff for HDL: ' . echoable_doi($doi));
return null; // @codeCoverageIgnoreEnd
return null;

Check warning on line 295 in expandFns.php

View check run for this annotation

Codecov / codecov/patch

expandFns.php#L295

Added line #L295 was not covered by tests
}
if (strpos($resp0, '302') !== false && strpos($resp1, '503') !== false && $resp2 === '') {
if (isset(NULL_DOI_LIST[$doi])) {
return false;

Check warning on line 299 in expandFns.php

View check run for this annotation

Codecov / codecov/patch

expandFns.php#L298-L299

Added lines #L298 - L299 were not covered by tests
}
if (isset(NULL_DOI_BUT_GOOD[$doi])) {
return true;

Check warning on line 302 in expandFns.php

View check run for this annotation

Codecov / codecov/patch

expandFns.php#L301-L302

Added lines #L301 - L302 were not covered by tests
}
bot_debug_log('Got two bad hops for HDL: ' . echoable_doi($doi));
return null;

Check warning on line 305 in expandFns.php

View check run for this annotation

Codecov / codecov/patch

expandFns.php#L304-L305

Added lines #L304 - L305 were not covered by tests
}
if (stripos($resp0 . $resp1 . $resp2, '404 Not Found') !== false || stripos($resp0 . $resp1 . $resp2, 'HTTP/1.1 404') !== false) {
return false; // Bad
Expand Down
Loading