diff --git a/hosts/ocaml/bin/sx_server.ml b/hosts/ocaml/bin/sx_server.ml index 193394de..18997bbd 100644 --- a/hosts/ocaml/bin/sx_server.ml +++ b/hosts/ocaml/bin/sx_server.ml @@ -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