From 5c56cb7f1ee3e4e5b9ac57dbc4f443207eaf9191 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Wed, 27 May 2020 13:11:32 -0400 Subject: [PATCH] debug msg --- src/Tiny_httpd.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Tiny_httpd.ml b/src/Tiny_httpd.ml index 73751c5c..b87b8e53 100644 --- a/src/Tiny_httpd.ml +++ b/src/Tiny_httpd.ml @@ -457,7 +457,9 @@ module Request = struct let line = Byte_stream.read_line ~buf bs in let meth, path = try Scanf.sscanf line "%s %s HTTP/1.1\r" (fun x y->x,y) - with _ -> raise (Bad_req (400, "Invalid request line")) + with _ -> + _debug (fun k->k "invalid request line: `%s`" line); + raise (Bad_req (400, "Invalid request line")) in let meth = Meth.of_string meth in _debug (fun k->k "got meth: %s, path %S" (Meth.to_string meth) path);