Skip to content

Commit 887dc06

Browse files
committed
don't print code for successful reply
1 parent f8aad91 commit 887dc06

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/server/httpaf/ezAPIServerHttpAf.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ let connection_handler ?catch ?allow_origin ?allow_headers ?allow_methods
7575
Lwt.return_unit
7676
| `http {Answer.code; body; headers=resp_headers} ->
7777
let status = Status.unsafe_of_code code in
78-
debug ~v:(if code = 200 then 1 else 0) "Reply computed to %S: %d" path_str code;
78+
debug ~v:(if code >= 200 && code < 300 then 1 else 0) "Reply computed to %S: %d" path_str code;
7979
debugf ~v:3 (fun () ->
8080
let content_type = List.assoc_opt "content-type" resp_headers in
8181
if body <> "" && (content_type = Some "application/json" || content_type = Some "text/plain") then

src/server/httpun/ezAPIServerHttpun.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ let connection_handler ?catch ?allow_origin ?allow_headers ?allow_methods
7676
| `ws (Ok ()) -> Lwt.return_unit
7777
| `http {Answer.code; body; headers=resp_headers} ->
7878
let status = Status.unsafe_of_code code in
79-
debug ~v:(if code = 200 then 1 else 0) "Reply computed to %S: %d" path_str code;
79+
debug ~v:(if code >= 200 && code < 300 then 1 else 0) "Reply computed to %S: %d" path_str code;
8080
debugf ~v:3 (fun () ->
8181
let content_type = List.assoc_opt "content-type" resp_headers in
8282
if body <> "" && (content_type = Some "application/json" || content_type = Some "text/plain") then

0 commit comments

Comments
 (0)