ocaml-cohttp
ocaml-cohttp copied to clipboard
cohttp-eio(server): reject request with 411 if Content-Length is not provided.
According to RFC 7230
A server MAY reject a request that contains a message body but not a Content-Length by responding with 411 > (Length Required).
Therefore reject requests if Content-Length is not provided but is required.
It says may. Should we leave it as an implementation detail for the library users to implement?
It says may. Should we leave it as an implementation detail for the library users to implement?
Yes, it will be opt in - implemented via middleware - but the functionality will be available from cohttp-eio package.