Skip to content

Commit 199bcff

Browse files
committed
more debug
1 parent e8c7d3c commit 199bcff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/core/request.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ let parse_req_start ~client_addr ~get_time_s ~buf (bs : IO.Input.t) :
109109
unit t option resp_result =
110110
try
111111
let line = IO.Input.read_line_using ~buf bs in
112-
Log.debug (fun k -> k "parse request line: %s" line);
112+
Log.debug (fun k -> k "parse request line: %S" line);
113113
let start_time = get_time_s () in
114114
let meth, path, version =
115115
try
@@ -121,7 +121,7 @@ let parse_req_start ~client_addr ~get_time_s ~buf (bs : IO.Input.t) :
121121
match http_version with
122122
| "HTTP/1.1" -> 1
123123
| "HTTP/1.0" -> 0
124-
| v -> invalid_arg (spf "unsupported HTTP version: %s" v)
124+
| v -> invalid_arg (spf "unsupported HTTP version: %S" v)
125125
in
126126
meth, path, version
127127
with
@@ -134,7 +134,7 @@ let parse_req_start ~client_addr ~get_time_s ~buf (bs : IO.Input.t) :
134134
raise (Bad_req (400, "Invalid request line"))
135135
in
136136
let meth = Meth.of_string meth in
137-
Log.debug (fun k -> k "got meth: %s, path %S" (Meth.to_string meth) path);
137+
Log.debug (fun k -> k "got meth: %S, path %S" (Meth.to_string meth) path);
138138
let headers = Headers.parse_ ~buf bs in
139139
let host =
140140
match Headers.get "Host" headers with
@@ -146,7 +146,7 @@ let parse_req_start ~client_addr ~get_time_s ~buf (bs : IO.Input.t) :
146146
let query =
147147
match Util.parse_query query with
148148
| Ok l -> l
149-
| Error e -> bad_reqf 400 "invalid query: %s" e
149+
| Error e -> bad_reqf 400 "invalid query: %S" e
150150
in
151151
let req =
152152
{

0 commit comments

Comments
 (0)