From 2ecef9826388a08e0372c06afd631e2e479d287b Mon Sep 17 00:00:00 2001 From: Rob Emery Date: Tue, 20 Oct 2026 11:47:33 +0100 Subject: [PATCH] Updating to support \n separated commands, might need to support \r\n as well, but this'll do for now --- tools/httpd_sim.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/httpd_sim.py b/tools/httpd_sim.py index 467e8fca..a68eb3fa 100755 --- a/tools/httpd_sim.py +++ b/tools/httpd_sim.py @@ -285,10 +285,13 @@ class Handler(SimpleHTTPRequestHandler): )) return parts - def parse_cmd(self, cmd): - pieces = cmd.split(" ") - handler = self.get_parsers().get(pieces[0]) - return handler(pieces) if handler else {} + def parse_cmd(self, cmdstring): + response = "" + for cmd in cmdstring.split("\n"): + pieces = cmd.split(" ") + handler = self.get_parsers().get(pieces[0]) + response += str(handler(pieces)) + "\n" + return response def get_parsers(self): return {