diff --git a/lualib/http/httpc.lua b/lualib/http/httpc.lua index 058e28a4..e3a63070 100644 --- a/lualib/http/httpc.lua +++ b/lualib/http/httpc.lua @@ -114,6 +114,8 @@ function httpc.request(method, hostname, url, recvheader, header, content) close_interface(interface, fd) if ok then return statuscode, body + elseif statuscode == 200 then + error(body) else error(statuscode) end