mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
debug_console 增加http post,避免get url转义问题 (#1964)
增加http post,避免get url转义问题
This commit is contained in:
@@ -104,7 +104,13 @@ local function console_main_loop(stdin, print, addr)
|
||||
local cmdline = url:sub(2):gsub("/"," ")
|
||||
docmd(cmdline, print, stdin)
|
||||
break
|
||||
elseif cmdline:sub(1,5) == "POST " then
|
||||
-- http post
|
||||
local code, url, method, header, body = httpd.read_request(sockethelper.readfunc(stdin, cmdline.. "\n"), 8192)
|
||||
docmd(body, print, stdin)
|
||||
break
|
||||
end
|
||||
|
||||
if cmdline ~= "" then
|
||||
docmd(cmdline, print, stdin)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user