@@ -8145,6 +8145,18 @@ function(dir, localOnly = FALSE, pkgSize = NA)
81458145 if (any(ind ))
81468146 bad <- bad [! ind , ]
81478147 }
8148+ if (NROW(bad ) &&
8149+ config_val_to_logical(Sys.getenv(" _R_CHECK_URLS_TAKE_403_STATUS_AS_OK_" ,
8150+ " TRUE" ))) {
8151+ # # Unfortunately, web servers increasingly use 403s for
8152+ # # "non-browser" accesses (and issue captcha challenges
8153+ # # otherwise), which seems strange for HEAD requests.
8154+ # # Arguably, the 403s could be taken to indicate that
8155+ # # the resource exists but access was not permitted, and
8156+ # # hence (for now by default, could be changed to only
8157+ # # optionally) take these as "OK".
8158+ bad <- bad [bad $ Status != " 403" , ]
8159+ }
81488160 if (NROW(bad ))
81498161 out $ bad_urls <- bad
81508162 }
@@ -8580,11 +8592,9 @@ function(dir, localOnly = FALSE, pkgSize = NA)
85808592 # # this can have multiple entries, e.g. for recommended packages.
85818593 meta0 <- unlist(meta1 [1L , ])
85828594 m_m <- as.vector(meta [" Maintainer" ]) # drop name
8583- m_d <- meta0 [" Maintainer" ]
8584- # There may be white space differences here
8585- m_m_1 <- gsub(" [[:space:]]+" , " " , m_m )
8586- m_d_1 <- gsub(" [[:space:]]+" , " " , m_d )
8587- if (! all(m_m_1 == m_d_1 )) {
8595+ m_d <- as.vector(meta0 [" Maintainer" ])
8596+ if (tolower(sub(" [^<]*<(.*)>.*" , " \\ 1" , m_m )) !=
8597+ tolower(sub(" [^<]*<(.*)>.*" , " \\ 1" , m_d ))) {
85888598 # # strwrap is used below, so we need to worry about encodings.
85898599 # # m_d is in UTF-8 already
85908600 if (Encoding(m_m ) == " latin1" ) m_m <- iconv(m_m , " latin1" )
0 commit comments