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

Add restJson1 protocol test for content-type and POST operation with no input #2342

Merged
merged 5 commits into from
Jul 12, 2024

Conversation

haydenbaker
Copy link
Contributor

Background


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@haydenbaker haydenbaker requested a review from a team as a code owner June 28, 2024 17:28
@haydenbaker haydenbaker requested a review from syall June 28, 2024 17:28
method: "POST",
uri: "/no_input_no_payload",
body: "",
forbidHeaders: [
"Content-Type"
Copy link
Contributor

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

Copy link
Contributor Author

@haydenbaker haydenbaker Jul 1, 2024

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 {
Copy link
Contributor

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.

@gosar gosar requested review from gosar and removed request for syall July 1, 2024 22:15
@haydenbaker haydenbaker merged commit 6466fe7 into main Jul 12, 2024
14 checks passed
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

Successfully merging this pull request may close these issues.

2 participants