当源URL指向TLS1.2服务器时,OneDrive文件上载失败
$ curl -L -H"Authorization: $ACCESS_TOKEN" -H"Content-Type: application/json" -H"Prefer: respond-async" "https://graph.microsoft.com/v1.0/me/drive/root/children" -d'{
"@microsoft.graph.sourceUrl": "https://tls-v1-2.badssl.com:1012/icons/icon-green.png",
"name": "icon-green.png",
"file": { }
}'这将返回一个202 Accepted,其中包含一个包含用于跟踪上传的URL的Location标头。以下是返回结果:
{"operation":"DownloadUrl","status":"failed","statusDescription":"Unexpected response 'InternalServerError The underlying connection was closed: An unexpected error occurred on a send.' when downloading all content"}使用TLS 1.0服务器(在Location标头之后)
$ curl -L -H"Authorization: $ACCESS_TOKEN" -H"Content-Type: application/json" -H"Prefer: respond-async" "https://graph.microsoft.com/v1.0/me/drive/root/children" -d'{
"@microsoft.graph.sourceUrl": "https://tls-v1-0.badssl.com:1010/icons/icon-red.png",
"name": "icon-green.png",
"file": { }
}'
{"operation":"DownloadUrl","percentageComplete":100.0,"resourceId":"6A071D3FEEC6C6B6!115","status":"completed","statusDescription":"URL was successfully downloaded to target"}发布于 2019-01-23 06:42:06
应该是这样,但显然不是这样。我们将研究如何添加支持。
更新:
这个问题现在已经解决了--在TLS 1.2端点上下载文件的请求应该可以工作。
https://stackoverflow.com/questions/54300143
复制相似问题