981 lyl = --> POST https://xxx1 http/1.1
981 lyl = Content-Type: application/json; charset=UTF-8
981 lyl = Content-Length: 94
982 lyl = --> END POST (encoded body omitted)
407 lyl = <-- 200 https://xxx1 (424ms)
407 lyl = Server: nginx
407 lyl = Date: Wed, 27 Feb 2019 08:29:14 GMT
407 lyl = Content-Type: text/plain;charset=UTF-8
407 lyl = Transfer-Encoding: chunked
407 lyl = Connection: keep-alive
407 lyl = Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
407 lyl = X-Frame-Options: DENY
407 lyl = X-Content-Type-Options: nosniff
408 lyl =
408 lyl = {"retCode":"00000","retInfo":"成功"}
408 lyl = <-- END HTTP (56-byte body)
453 lyl = --> POST https://xxx2 http/1.1
453 lyl = Content-Type: application/json; charset=UTF-8
454 lyl = Content-Length: 897
454 lyl =
454 lyl = {"dev_info":{"info":{"cityid":"101280301","id":"","name":""}}}
455 lyl = --> END POST (897-byte body)
718 lyl = <-- 500 https://xxx2 (262ms)
718 lyl = Set-Cookie: JSESSIONID=xxx;path=/xxx;Secure;HttpOnly
718 lyl = Content-Type: application/json;charset=UTF-8
718 lyl = Content-Length: 140
718 lyl = Date: Wed, 27 Feb 2019 08:29:14 GMT
718 lyl = Connection: close
719 lyl =
719 lyl = {"retCode":"A00001-500","retInfo":"","description":"Please contact administrator to confirm the internal error"}
719 lyl = <-- END HTTP (140-byte body)
722 2099-3613/ E/AbsRDS lyl123: [ (xxx.java:159)#Call ] HTTP 500
1
head+body发给服务器,返回:
200 一切正常
500 内部服务器错误
404 URL错误
2.
此时给服务器发送内容的长度为897,但是服务器只处理了140,就返回了错误500,此时要检查head/body是否合规:
head可以比Server文档所要求的参数多,但body必须和Server文档所要求的参数一致,不能多,也不能少。
参考: