reuqest代码片段如下: wx.request({ url: 'http://111.202.102.214:57070/t/file/upgrade/1535542112/ota.bin_T16_1535542112485', header: { 'Content-Type': 'application/octet-stream', }, responseType: 'arraybuffer', success: function (res) { console.log('res size:',res.data.byteLength); }, fail:function(res){ } }) 问题再次描述: 正常Case【MX5,安卓5.1,微信版本6.6.7,iPhone手机】:获取以上文件,返回arraybuffer length和content-length相同。 异常Case【vivo X9 ,安卓7.1.2,微信版本6.7.2,MI MAX ,安卓7.0,微信版本6.7.2】: 获取以上文件,返回arraybuffer length比content-length多7个字节(文件结果分析来看,前面多4个字节,后面多3个字节)。 感谢帮忙分析!
android部分机获取的二进制流比服务器的多几个字节,ios没有这个问题微信小程序,从服务器获取二进制流,android6.0 以上版本获取的arraybuffer比服务器的字节数多了几个,为什么? [图片] [图片]
2018-08-31