CRAN 检查中的 URL 无效
Invalid URL in CRAN checks
我正在尝试更新 CRAN 中的包,但出现以下错误:
Found the following (possibly) invalid URLs:
URL: https://doi.org/10.1175/1520-0469(1985)042<0217:OTTDPO>2.0.CO;2
From: man/EPflux.Rd
Status: Error
Message: libcurl error code 35:
schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE (0x80090326) - This error usually occurs when a fatal SSL/TLS alert is received (e.g. handshake failed).
这些 URL 有效并且实际上是使用 \doi{} 宏创建的(例如 \doi{10.1175/1520-0469(1985)042<0217:OTTDPO>2.0.CO;2}
)
即使使用编码的 URL(根据 )也会失败并出现相同的错误:
Found the following (possibly) invalid URLs:
URL: https://doi.org/10.1175/1520-0469(1985)042%3C0217:OTTDPO%3E2.0.CO;2
From: man/EPflux.Rd
Status: Error
Message: libcurl error code 35:
schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE (0x80090326) - This error usually occurs when a fatal SSL/TLS alert is received (e.g. handshake failed).
关于如何解决这个问题有什么建议吗?
我认为发生这种情况的原因是因为
https://doi.org/10.1175/1520-0469(1985)042<0217:OTTDPO>2.0.CO;2
正在重定向到
https://journals.ametsoc.org/view/journals/atsc/42/3/1520-0469_1985_042_0217_ottdpo_2_0_co_2.xml
您可以尝试将 URL 更改为 https://journals.ametsoc.org/view/journals/atsc/42/3/1520-0469_1985_042_0217_ottdpo_2_0_co_2.xml
并查看是否通过检查吗?
另一种可能
来自 here):
some (DOIs) require encoding so that the DOI works correctly when used in URL form
所以你也许可以先编码 url
URLencode("https://doi.org/10.1175/1520-0469(1985)042<0217:OTTDPO>2.0.CO;2")
[1] "https://doi.org/10.1175/1520-0469(1985)042%3C0217:OTTDPO%3E2.0.CO;2"
另请注意:
We strongly recommend that only the following characters are used within a DOI name: “0–9”, “a–z”, and “-._/”.
所以可能 <
字符导致了这个问题? (也可能 (
)
另一个想法
从错误消息中注意到这一点:
This error usually occurs when a fatal SSL/TLS alert is received (e.g. handshake failed).
如果我们再试一次而不用担心 ssl,那可能会奏效。
换句话说,尝试使用此 url 代替:http://doi.org/10.1175/1520-0469(1985)042<0217:OTTDPO>2.0.CO;2
Hadley suggested 可以安全地忽略这些注释。我把包裹寄给了CRAN并被接受了。
那么,答案就是忽略这些注释。
我正在尝试更新 CRAN 中的包,但出现以下错误:
Found the following (possibly) invalid URLs:
URL: https://doi.org/10.1175/1520-0469(1985)042<0217:OTTDPO>2.0.CO;2
From: man/EPflux.Rd
Status: Error
Message: libcurl error code 35:
schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE (0x80090326) - This error usually occurs when a fatal SSL/TLS alert is received (e.g. handshake failed).
这些 URL 有效并且实际上是使用 \doi{} 宏创建的(例如 \doi{10.1175/1520-0469(1985)042<0217:OTTDPO>2.0.CO;2}
)
即使使用编码的 URL(根据
Found the following (possibly) invalid URLs:
URL: https://doi.org/10.1175/1520-0469(1985)042%3C0217:OTTDPO%3E2.0.CO;2
From: man/EPflux.Rd
Status: Error
Message: libcurl error code 35:
schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE (0x80090326) - This error usually occurs when a fatal SSL/TLS alert is received (e.g. handshake failed).
关于如何解决这个问题有什么建议吗?
我认为发生这种情况的原因是因为
https://doi.org/10.1175/1520-0469(1985)042<0217:OTTDPO>2.0.CO;2
正在重定向到
https://journals.ametsoc.org/view/journals/atsc/42/3/1520-0469_1985_042_0217_ottdpo_2_0_co_2.xml
您可以尝试将 URL 更改为 https://journals.ametsoc.org/view/journals/atsc/42/3/1520-0469_1985_042_0217_ottdpo_2_0_co_2.xml
并查看是否通过检查吗?
另一种可能
来自 here):
some (DOIs) require encoding so that the DOI works correctly when used in URL form
所以你也许可以先编码 url
URLencode("https://doi.org/10.1175/1520-0469(1985)042<0217:OTTDPO>2.0.CO;2")
[1] "https://doi.org/10.1175/1520-0469(1985)042%3C0217:OTTDPO%3E2.0.CO;2"
另请注意:
We strongly recommend that only the following characters are used within a DOI name: “0–9”, “a–z”, and “-._/”.
所以可能 <
字符导致了这个问题? (也可能 (
)
另一个想法
从错误消息中注意到这一点:
This error usually occurs when a fatal SSL/TLS alert is received (e.g. handshake failed).
如果我们再试一次而不用担心 ssl,那可能会奏效。
换句话说,尝试使用此 url 代替:http://doi.org/10.1175/1520-0469(1985)042<0217:OTTDPO>2.0.CO;2
Hadley suggested 可以安全地忽略这些注释。我把包裹寄给了CRAN并被接受了。
那么,答案就是忽略这些注释。