Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## current

- cohttp.response: fix malformed status header for custom status codes (@mseri @aalekseyev #752)
- Remove dependency to base (@samoht #745)
- fix opam files and dependencies
- add GitHub Actions workflow (@smorimoto #739)
Expand Down
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