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

Fixes missing Content-Length header when body is empty #1778

Merged
merged 3 commits into from Oct 7, 2022

Conversation

c00ler
Copy link
Contributor

@c00ler c00ler commented Oct 3, 2022

The DefaultClient was modified to add the missing Content-Length header to POST and PUT requests. PATCH request is not supported by the HttpUrlConnection. Since Content-Length is the restricted header, I set the empty body, and its length is calculated by the HttpUrlConnection.

Fixes #1229

<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>${maven-install-plugin.version}</version>
<configuration>
<createChecksum>true</createChecksum>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -51,16 +51,6 @@
<scope>test</scope>
</dependency>

<dependency>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated dependencies

@kdavisk6 kdavisk6 merged commit b596abe into OpenFeign:master Oct 7, 2022
@c00ler c00ler deleted the avenderov/1229/post-empty-body branch October 7, 2022 07:04
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.

Default Client does not include Content-Length header for POST with Empty Body
2 participants