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

avoid parsing the body if content-type is missing #757

Closed
stevehu opened this issue Aug 25, 2020 · 2 comments
Closed

avoid parsing the body if content-type is missing #757

stevehu opened this issue Aug 25, 2020 · 2 comments

Comments

@stevehu
Copy link
Contributor

stevehu commented Aug 25, 2020

while working on issue #753, we have parsed the body even the content-type header is missing. This might not be the desired behaviour if the request is a get or delete which doesn't have a content-type. We cannot depend on users to config their endpoint correctly to only include body middleware handler to the PUT, POST and PATCH endpoints. So the decision is to only parse the body when content type exists in the header.

@stevehu
Copy link
Contributor Author

stevehu commented Aug 25, 2020

@stevehu
Copy link
Contributor Author

stevehu commented Aug 25, 2020

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

1 participant