【已解决】微信小程序 api:uploadFile http协议实现 bug
- 当前 Bug 的表现(可附上截图)
wx.uploadFile 接口的http请求中,请求头content-type中声明的boundary与请求体中实际的boundary不一致,缺两个-字符,会导致服务器在解析请求体时混入脏数据。
如下截图所示:
第一个截图第一行显示了服务器收到的请求头content-type字段值,从第二行开始为请求体
第二个截图明显可以看到,请求头中boundary数据与请求体中不一致


- 预期表现
服务器在解析请求时会把请求体数据混入脏数据
- 复现路径
- 提供一个最简复现 Demo
4 回复