Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cohttp/scripts/generate.ml
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,10 @@ let output_string_of_status oc ~mli s =
else (
append oc "let string_of_status: status_code -> string = function";
iter (fun c -> append oc " | %s -> \"%d %s\"" c.constr c.code c.descr) s;
append oc " | `Code cod -> string_of_int cod");
(* the response status must include an extra space even if no description is present, cf. #752 *)
append oc " | `Code cod ->";
append oc " let code = string_of_int cod in";
append oc " code ^ \" Status \" ^ code");
append oc ""

let output_reason_phrase_of_code oc ~mli s =
Expand Down