-
Notifications
You must be signed in to change notification settings - Fork 218
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
Add restJson1 protocol test for content-type and POST operation with no input #2342
Conversation
method: "POST", | ||
uri: "/no_input_no_payload", | ||
body: "", | ||
forbidHeaders: [ | ||
"Content-Type" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like missed Content-Length here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clients SHOULD include Content-Length: 0
on a POST without no body, hence not including Content-Length
in forbidHeaders
here: https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.2
apply TestNoInputNoPayload @httpRequestTests([ | ||
@readonly | ||
@http(uri: "/no_input_no_payload", method: "POST") | ||
operation TestPostNoInputNoPayload { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say add TestPostNoPayload (similar to TestNoPayload but with POST) also. That would actually more closely represent the issue represented in the .NET issue.
Background
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.