0%

2023-04-28-14-52-03

content-length导致的问题

1
2
-H 'Content-Length: 107' \

在go里直接用exec执行curl,用replace替换参数来快速造数据,结果一直遇到

1
2
{"code":400,"desc":"\u003cMalformed.JSON\u003e error at parsing json: unexpected end of JSON input","errcode":"Malformed.JSON","type":"Malformed"}

一直以为是json参数有问题,但最后才明白,是Content-Length还是之前的,没重新计算导致的