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(server): reject request with 411 if Content-Length is not provided. #931

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

Comments

@bikallem
Copy link
Contributor

bikallem commented Sep 6, 2022

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.

@mseri
Copy link
Collaborator

mseri commented Sep 6, 2022

It says may. Should we leave it as an implementation detail for the library users to implement?

@bikallem
Copy link
Contributor Author

bikallem commented Sep 7, 2022

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.

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