'http请求C没有大写' (#1444)

Co-authored-by: 王羽平.Cerberus <wangyuping.cerberus@snda.com>
This commit is contained in:
mrCerberus
2021-07-21 20:33:22 +08:00
committed by GitHub
parent d9762b8f38
commit 0e9c0c34a9

View File

@@ -160,11 +160,11 @@ function M.request(interface, method, host, url, recvheader, header, content)
end
if content then
local data = string.format("%s %s HTTP/1.1\r\n%scontent-length:%d\r\n\r\n", method, url, header_content, #content)
local data = string.format("%s %s HTTP/1.1\r\n%sContent-length:%d\r\n\r\n", method, url, header_content, #content)
write(data)
write(content)
else
local request_header = string.format("%s %s HTTP/1.1\r\n%scontent-length:0\r\n\r\n", method, url, header_content)
local request_header = string.format("%s %s HTTP/1.1\r\n%sContent-length:0\r\n\r\n", method, url, header_content)
write(request_header)
end