Skip to content

Commit

Permalink
fix verify_links to accept doi links
Browse files Browse the repository at this point in the history
I'm not sure this is useful but many dois of mine get rejected and pop up during the link verification. Adding the x-bibtex header (which I spotted in JuliaWeb/HTTP.jl#796) seems to fix that for me, hence this tiny PR. Do with it what you will!
  • Loading branch information
briochemc authored Sep 2, 2024
1 parent c06db25 commit 4ada547
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/manager/post_processing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ function verify_links_page(path::AS, online::Bool)
link = m.captures[1] * m.captures[2]
ok = false
try
ok = HTTP.request("HEAD", link, timeout=3).status == 200
headers = contains(link, "doi.org") ? ["Accept" => "application/x-bibtex"] : []
ok = HTTP.request("HEAD", link, headers, timeout=3).status == 200
catch e
end
if !ok
Expand Down

0 comments on commit 4ada547

Please sign in to comment.