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

[bash] force content length in empty post #10462

Merged

Conversation

Ricordel
Copy link
Contributor

In the case where we are making empty posts, use -d '' to force curl to set the Content-Length header to 0. Some backends (among which Microsoft Kestrel) are sensitive about POST without a Content-Length set.

This pull request adds a -d '' option to curl's command-line in such a situation

I don't have an extensive test setup to provide, for a simple change like this I'm not sure it's necessary. Please let me know if I should add things.

As this is bash: CC @frol, @bkryza, @kenjones-cisco

In the case where we are making empty posts, use -d '' to force curl to
set the Content-Length header to 0. Some backends (among which Microsoft
Kestrel) are sensitive about POST without a Content-Length set.
@wing328
Copy link
Member

wing328 commented Sep 23, 2021

LGTM but I've not tested it locally

@wing328
Copy link
Member

wing328 commented Sep 23, 2021

CI failures not related to this PR.

@wing328 wing328 merged commit 476a82c into OpenAPITools:master Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants