diff --git a/http.lua b/http.lua index 947a761..29d43b8 100644 --- a/http.lua +++ b/http.lua @@ -762,7 +762,7 @@ function M.send(method, t) end if r.headers["content-length"] and tonumber(r.headers["content-length"]) > 0 then - r.content, err = socket:receive("*a") + r.content, err = socket:receive(tonumber(r.headers["content-length"])) if not r.content then socket:close()