mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
fix #1057
This commit is contained in:
@@ -72,6 +72,9 @@ local function request(interface, method, host, url, recvheader, header, content
|
|||||||
local padding = read(length - #body)
|
local padding = read(length - #body)
|
||||||
body = body .. padding
|
body = body .. padding
|
||||||
end
|
end
|
||||||
|
elseif code == 204 or code == 304 or code < 200 then
|
||||||
|
body = ""
|
||||||
|
-- See https://stackoverflow.com/questions/15991173/is-the-content-length-header-required-for-a-http-1-0-response
|
||||||
else
|
else
|
||||||
-- no content-length, read all
|
-- no content-length, read all
|
||||||
body = body .. interface.readall()
|
body = body .. interface.readall()
|
||||||
|
|||||||
Reference in New Issue
Block a user