mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 04:33:05 +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("/"," ")
|
local cmdline = url:sub(2):gsub("/"," ")
|
||||||
docmd(cmdline, print, stdin)
|
docmd(cmdline, print, stdin)
|
||||||
break
|
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
|
end
|
||||||
|
|
||||||
if cmdline ~= "" then
|
if cmdline ~= "" then
|
||||||
docmd(cmdline, print, stdin)
|
docmd(cmdline, print, stdin)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user