Skip to content

Commit

Permalink
more debug
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Jun 18, 2024
1 parent e8c7d3c commit 199bcff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/request.ml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ let parse_req_start ~client_addr ~get_time_s ~buf (bs : IO.Input.t) :
unit t option resp_result =
try
let line = IO.Input.read_line_using ~buf bs in
Log.debug (fun k -> k "parse request line: %s" line);
Log.debug (fun k -> k "parse request line: %S" line);
let start_time = get_time_s () in
let meth, path, version =
try
Expand All @@ -121,7 +121,7 @@ let parse_req_start ~client_addr ~get_time_s ~buf (bs : IO.Input.t) :
match http_version with
| "HTTP/1.1" -> 1
| "HTTP/1.0" -> 0
| v -> invalid_arg (spf "unsupported HTTP version: %s" v)
| v -> invalid_arg (spf "unsupported HTTP version: %S" v)
in
meth, path, version
with
Expand All @@ -134,7 +134,7 @@ let parse_req_start ~client_addr ~get_time_s ~buf (bs : IO.Input.t) :
raise (Bad_req (400, "Invalid request line"))
in
let meth = Meth.of_string meth in
Log.debug (fun k -> k "got meth: %s, path %S" (Meth.to_string meth) path);
Log.debug (fun k -> k "got meth: %S, path %S" (Meth.to_string meth) path);
let headers = Headers.parse_ ~buf bs in
let host =
match Headers.get "Host" headers with
Expand All @@ -146,7 +146,7 @@ let parse_req_start ~client_addr ~get_time_s ~buf (bs : IO.Input.t) :
let query =
match Util.parse_query query with
| Ok l -> l
| Error e -> bad_reqf 400 "invalid query: %s" e
| Error e -> bad_reqf 400 "invalid query: %S" e
in
let req =
{
Expand Down

0 comments on commit 199bcff

Please sign in to comment.