This commit is contained in:
Cloud Wu
2021-08-09 19:31:32 +08:00
parent 0207b9210a
commit 740b91533d

View File

@@ -1,6 +1,5 @@
local table = table local table = table
local type = type local type = type
local sockethelper = require "http.sockethelper"
local M = {} local M = {}
@@ -171,7 +170,7 @@ function M.request(interface, method, host, url, recvheader, header, content)
local tmpline = {} local tmpline = {}
local body = M.recvheader(read, tmpline, "") local body = M.recvheader(read, tmpline, "")
if not body then if not body then
error(sockethelper.socket_error) error("Recv header failed")
end end
local statusline = tmpline[1] local statusline = tmpline[1]