【发布时间】:2014-02-09 19:51:40
【问题描述】:
瞄准 我正在尝试编写一个语句来连接到共享点在线列表以检索数据以在 R 中使用。
背景 这是我第一次使用 RCurl/curl/libcurl,我试图阅读文档,但它超出了我的范围,并且没有任何相关示例。
使用
a<-getURL("https://example.sharepoint.com/_vti_bin/listdata.svc/Glossary")
导致错误
Error in function (type, msg, asError = TRUE) :
Unknown SSL protocol error in connection to example.sharepoint.com:443
结合 google 和对神秘的 libcurl 文档的解密发现问题是由于 SSL 类型造成的。我在 shell 中使用 curl 进行验证,结果从共享点服务器得到了肯定的响应(嗯,除了需要添加用户名和密码)
curl https://example.sharepoint.com/_vti_bin/listdata.svc/Glossary -v -SSLv3
问题 我无法弄清楚如何在 RTFM 之后在我的 getURL() 函数中包含 -SSLv3 参数
请求的解决方案 修改此语句以利用 SSLv3
a<-getURL("https://example.sharepoint.com/_vti_bin/listdata.svc/Glossary")
【问题讨论】:
-
向 Duncan Temple Lang 道歉,但 RCurl 文档一团糟。您基本上需要将适当的 libcurl 选项 (see documentation here) 映射到相关的 RCurl 参数(请参阅
listCurlOptions()了解所有可能的选项)。您可能需要sslversion参数。它可能被用作sslversion="CURL_SSLVERSION_SSLv3",但您可能需要稍微尝试一下。 -
感谢您的帮助 - 添加时的行
sslversion="SSLVERSION_SSLv3"在语法上是正确的,但在我看来并没有帮助。将继续插入,但在此期间,如果您想将其作为答案,我可以将其标记为已接受 -
好吧,如果它不能解决问题,那么这不是一个很好的答案。 :) 您是继续遇到同样的错误还是新问题?
-
同样的错误,但我不确定它是否与 curl 命令相同 收到此消息
< X-MSDAVEXT_Error: 917656; Access denied. Before opening files in this location, you must first browse to the web site and select the option to login automatically. -
这听起来像是服务器问题,而不是 RCurl 问题。