From ba48597fe7d580aaf3eaff9c8cf283f7049e1b3b Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Tue, 12 Mar 2024 21:14:13 -0500 Subject: [PATCH] the response header may use lower-case `location`, not necessarily `Location` (this should fix #436) --- R/install.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/install.R b/R/install.R index 98db88611..660ba2d28 100644 --- a/R/install.R +++ b/R/install.R @@ -206,7 +206,7 @@ auto_repo = function() { curlGetHeaders('https://mirror.ctan.org/systems/texlive/tlnet'), error = function(e) character() ) - x = xfun::grep_sub('^location: ([^[:space:]]+)\\s*$', '\\1', x) + x = xfun::grep_sub('^location: ([^[:space:]]+)\\s*$', '\\1', x, ignore.case = TRUE) x = tail(x, 1) if (length(x) == 1) x else 'ctan' }