fix: httpc.post

调用httpc.post时,如果没有在header里面设置host时有问题
This commit is contained in:
HuaYang Huang
2015-04-01 17:54:22 +08:00
parent 6b87f159b4
commit ec1bca238e

View File

@@ -16,6 +16,8 @@ local function request(fd, method, host, url, recvheader, header, content)
end
if header.host then
host = ""
else
host = string.format("host:%s\r\n", host)
end
else
host = string.format("host:%s\r\n",host)