微信小程序dowloadfile ssl hand shake error
发布于 5 年前 作者 xiuyingsun 11747 次浏览 来自 问答

配置https下载地址,在某些android手机上下载文件出现ssl hand shake error

1 回复

Bug & Tip

  1. tip: content-type 默认为 'application/json'

  2. bug: 开发者工具 0.10.102800 版本,header 的 content-type 设置异常;

  3. tip: 客户端的 HTTPS TLS 版本为1.2,但 Android 的部分机型还未支持 TLS 1.2,所以请确保 HTTPS 服务器的 TLS 版本支持1.2及以下版本;

  4. tip: 要注意 method 的 value 必须为大写(例如:GET);

  5. tip: url 中不能有端口;

  6. tip: request 的默认超时时间和最大超时时间都是 60s

  7. tip: request 的最大并发数是 5

  8. tip: 网络请求的 referer 是不可以设置的,格式固定为 https://servicewechat.com/{appid}/{version}/page-frame.html,其中 {appid} 为小程序的 appid,{version} 为小程序的版本号,版本号为 0 表示为开发版。

回到顶部