From 4ada5476b5481abbb3583a7ad4d161d49675fcaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Pasquier?= <4486578+briochemc@users.noreply.github.com> Date: Mon, 2 Sep 2024 10:55:08 +1000 Subject: [PATCH] fix verify_links to accept doi links 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 https://github.com/JuliaWeb/HTTP.jl/issues/796) seems to fix that for me, hence this tiny PR. Do with it what you will! --- src/manager/post_processing.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/manager/post_processing.jl b/src/manager/post_processing.jl index 279bab1d8..4840171da 100644 --- a/src/manager/post_processing.jl +++ b/src/manager/post_processing.jl @@ -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