Fix debug endpoint: use raw_path to preserve query string
The query string was stripped from path for routing but the debug endpoint needs it to parse ?expr= and ?name= params. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2522,8 +2522,9 @@ let http_mode port =
|
||||
write_response fd (http_redirect "/sx/"); true
|
||||
end else
|
||||
(* Debug endpoint — runs on main thread, no render worker *)
|
||||
let raw_decoded = url_decode raw_path in
|
||||
if String.length path > 11 && String.sub path 0 11 = "/sx/_debug/" then begin
|
||||
let cmd = String.sub path 11 (String.length path - 11) in
|
||||
let cmd = String.sub raw_decoded 11 (String.length raw_decoded - 11) in
|
||||
let query_start = try String.index cmd '?' with Not_found -> String.length cmd in
|
||||
let action = String.sub cmd 0 query_start in
|
||||
let query = if query_start < String.length cmd - 1
|
||||
|
||||
Reference in New Issue
Block a user