我正在运行 Lua HTTP 客户端,请求导致错误 400:
[root]# ./luatest
<!DOCTYPE HTML><html><head><title>400 Bad Request</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link href="/imgs/errors.css" rel="stylesheet" type="text/css"></head>
<body><h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.</p></body></html> 400 table: 0x1ba1f70 HTTP/1.1 400 Bad Request
[root]# cat luatest
#!/usr/bin/lua
local http = require("socket.http")
print(http.request("http://localhost/"))
[root]# curl "http://localhost"
<html> hi there </html> [root]#
G-WAN 正确响应 curl 客户端请求,但在从 lua 请求相同文档时会死机。我们是否缺少某些东西,或者这只是行不通?