Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cohttp-eio: Content-Type header #935

Open
bikallem opened this issue Sep 6, 2022 · 2 comments
Open

cohttp-eio: Content-Type header #935

bikallem opened this issue Sep 6, 2022 · 2 comments

Comments

@bikallem
Copy link
Contributor

bikallem commented Sep 6, 2022

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.

@mseri
Copy link
Collaborator

mseri commented Sep 6, 2022

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

@bikallem
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants