Skip to content

Commit a89e6a4

Browse files
authored
fix verify_links to accept doi links (#1091)
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!
1 parent 2175d33 commit a89e6a4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/manager/post_processing.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,8 @@ function verify_links_page(path::AS, online::Bool)
302302
link = m.captures[1] * m.captures[2]
303303
ok = false
304304
try
305-
ok = HTTP.request("HEAD", link, timeout=3).status == 200
305+
headers = contains(link, "doi.org") ? ["Accept" => "application/x-bibtex"] : []
306+
ok = HTTP.request("HEAD", link, headers, timeout=3).status == 200
306307
catch e
307308
end
308309
if !ok

0 commit comments

Comments
 (0)