httpmime-4.1.3.jar和httpmime-4.3.6.jar 发送的http请求有差异,导致服务端无法接收到数据。



可以上传的


POST http://ip/a/web/index.php?r=bb/upload-pic HTTP/1.1
Connection: close
Content-Length: 324252
Content-Type: multipart/form-data; boundary=R6hIKp1ZgmBTmYAJXZNN4kxhLtlD5MUo0K6
Host: 192.168.3.4
User-Agent: HttpComponents/1.1
Expect: 100-continue


--R6hIKp1ZgmBTmYAJXZNN4kxhLtlD5MUo0K6
Content-Disposition: form-data; name="image"; filename="idcard1.jpg"
Content-Type: image/jpg


无法上传的


POST http://ip/a/web/index.php?r=bb/upload-pic HTTP/1.1
Connection: close
Content-Length: 324218
Content-Type: multipart/form-data; boundary=djZCMpUCI7D29dbMh2Zp1pL6FJTD5F0N4824rY
Host: 192.168.3.4
User-Agent: HttpComponents/1.1
Expect: 100-continue


--djZCMpUCI7D29dbMh2Zp1pL6FJTD5F0N4824rY
Content-Disposition: form-data; name="image"

你可能感兴趣的:(Android)