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

Invalid content-type header is set in case of null body in request #19

Closed
sufyankhanrao opened this issue Feb 1, 2023 · 0 comments · Fixed by #20
Closed

Invalid content-type header is set in case of null body in request #19

sufyankhanrao opened this issue Feb 1, 2023 · 0 comments · Fixed by #20
Assignees
Labels
bug Something isn't working

Comments

@sufyankhanrao
Copy link
Collaborator

The current implementation allows the content-type header to be set to text/plain; charset=utf-8 when the request body is not set which is an invalid behavior. As content-type header points to the request's payload.When there is no payload in the request therefore the content type should not be set unless explicitly specified in the spec.

@sufyankhanrao sufyankhanrao added the bug Something isn't working label Feb 1, 2023
@sufyankhanrao sufyankhanrao self-assigned this Feb 1, 2023
sufyankhanrao added a commit that referenced this issue Feb 1, 2023
This commit bears a fix for the case when request body is null but the content-type header is being added unless specified in the spec.  This commit address the fix for this and does not allow to add content-type header for null body request.

closes #19
sufyankhanrao added a commit that referenced this issue Feb 2, 2023
…der (#20)

This commit bears a fix for the case when request body is null but the content-type header is being added unless specified in the spec.  This commit address the fix for this and does not allow to add content-type header for null body request.

closes #19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant