忽略RCurl或卷曲中的弱DH

问题描述

我使用下面的代码从帖子的url下载CSV,但是由于我对系统libcurl的最新更新,我的卷曲变得更加谨慎,并抱怨DH参数弱,在bash中,我可以忽略弱DH- --ciphers 'DEFAULT:!DH'选项的参数。我在GETfetch_memorygetURL包中找不到httrcurlRCurl函数的选项,一样。

如何忽略R中的此错误? (其他所有受支持的库也都可以使用,最好是tidyverse或r-opensci的东西)

raw_data <- read_delim(
  "https://info.gesundheitsministerium.at/data/Epikurve.csv",delim = ";",col_types = cols(col_date(format="%d.%m.%Y"),col_integer(),col_datetime())
  )

请注意,根据您的libcurl版本,您将无法重现此版本,对于弱DH参数,较旧的版本似乎更容忍。我从事Debian测试。

解决方法

因为curl命令行实用程序在我的平台上可用,所以我找到的最简单的解决方案就是使用它来下载数据,并在bash中使用这些参数。

raw_data <- read_delim(
  system2(
    "curl",args=c(
      "https://info.gesundheitsministerium.at/data/Epikurve.csv","--ciphers","'DEFAULT:!DH'"
    ),stdout=TRUE
  ),delim = ";",locale=locale(
    encoding = "UTF-8",date_format = "%d.%m.%Y",tz = "CET"
    )
  )