mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
@@ -186,7 +186,7 @@ function M.request(interface, method, host, url, recvheader, header, content)
|
|||||||
|
|
||||||
if content then
|
if content then
|
||||||
local data
|
local data
|
||||||
if header["transfer-encoding"] == "chunked" then
|
if header and header["transfer-encoding"] == "chunked" then
|
||||||
data = string.format("%s %s HTTP/1.1\r\n%s\r\n", method, url, header_content)
|
data = string.format("%s %s HTTP/1.1\r\n%s\r\n", method, url, header_content)
|
||||||
else
|
else
|
||||||
data = string.format("%s %s HTTP/1.1\r\n%sContent-length:%d\r\n\r\n", method, url, header_content, #content)
|
data = string.format("%s %s HTTP/1.1\r\n%sContent-length:%d\r\n\r\n", method, url, header_content, #content)
|
||||||
|
|||||||
Reference in New Issue
Block a user