From 76d73c295f229b853f5e418a5f929e3e26302a62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91?= <273461474@qq.com> Date: Wed, 7 Aug 2024 10:54:03 +0800 Subject: [PATCH] =?UTF-8?q?debug=5Fconsole=20=E5=A2=9E=E5=8A=A0http=20post?= =?UTF-8?q?=EF=BC=8C=E9=81=BF=E5=85=8Dget=20url=E8=BD=AC=E4=B9=89=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(#1964)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加http post,避免get url转义问题 --- service/debug_console.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/service/debug_console.lua b/service/debug_console.lua index ea637911..4c4fb779 100644 --- a/service/debug_console.lua +++ b/service/debug_console.lua @@ -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