ocaml-cohttp icon indicating copy to clipboard operation
ocaml-cohttp copied to clipboard

cohttp-eio: Content-Type header

Open bikallem opened this issue 3 years ago • 2 comments

https://www.rfc-editor.org/rfc/rfc9110#section-8.3

A sender that generates a message containing content SHOULD generate a Content-Type header field in that message unless the intended media type of the enclosed representation is unknown to the sender.

Check Server and client include Content-Type headers as required.

bikallem avatar Sep 06 '22 16:09 bikallem

You don’t know a priori what is the content. I think we should leave it to the library users to do

mseri avatar Sep 06 '22 17:09 mseri

Yes, I agree. This is mostly a check point for me to check if Content-Type headers are added to some responses or request we expose from the cohttp-eio library, e.g. https://github.com/mirage/ocaml-cohttp/blob/master/cohttp-eio/src/cohttp_eio.mli#L67

bikallem avatar Sep 14 '22 16:09 bikallem