【问题标题】:HTTP Send Post-Request failsHTTP 发送后请求失败
【发布时间】:2019-05-09 08:53:56
【问题描述】:

我正在尝试使用 GID 获取员工信息,例如姓名和电子邮件,但在尝试发送 Post 请求时出现以下错误。

错误:写入 EPROTO 101057795:error:14094410:SSL 例程:ssl3_read_bytes:sslv3 警报握手

在 WriteWrap.afterWrite [as oncomplete] (net.js:864:14) 代码:'EPROTO',errno:'EPROTO', 系统调用:'写'}

这就是我的代码的样子

var request = require('request');

// Set the headers
var headers = {
    'User-Agent':       'deprecated',
    'accepted':     'application/json',
    'applicationuser':'deprecated'

}
// Configure the request
var options = {
    url: 'https://***/***/persons/gid=***',
    method: 'POST',
    secureProtocol : "TLSv1_2_method",
    headers: headers
}

// Start the request
request(options, function (error, response, body) {
    if (!error && response.statusCode == 200) {
        // Print out the response body
        console.log(body)
    }
    else{console.log(error)}
})

【问题讨论】:

  • @james 您认为解决方案应该是什么?上面的sn-p代码有什么要补充的吗?
  • 这表明某些版本的 openSSL 在尝试通过负载均衡器连接到一组不具有相同版本 TLS 的服务器时难以降级连接。我不知道升级到更新的 openSSL 是否会解决它,但我会试一试。
  • 如何尝试升级openSSL的版本?我只是这个话题的新手:(
  • 我从来没有做过。我会谷歌它。

标签: node.js ssl https openssl http-post


【解决方案1】:

错误来自响应;实际上路由函数响应这个。通常是因为您需要的证书不正确。 您可以查看更多信息Solving sslv3 alert handshake failure when trying to use a client certificate

【讨论】:

  • 您认为解决方案应该是什么?上面的sn-p代码有什么要补充的吗?
  • 你需要检查你的客户的文档,或者你正在尝试做的网络
猜你喜欢
  • 1970-01-01
  • 2022-01-21
  • 1970-01-01
  • 2012-09-15
  • 2019-06-28
  • 2021-03-20
  • 1970-01-01
  • 1970-01-01
  • 2020-04-06
相关资源
最近更新 更多