Skip to content

fix: avoid inferring Content-Type without body#1022

Closed
answndud wants to merge 1 commit intospring-projects:mainfrom
answndud:fix/issue-1017-content-type
Closed

fix: avoid inferring Content-Type without body#1022
answndud wants to merge 1 commit intospring-projects:mainfrom
answndud:fix/issue-1017-content-type

Conversation

@answndud
Copy link

@answndud answndud commented Feb 4, 2026

Summary

  • Avoid adding application/x-www-form-urlencoded when POST/PUT/PATCH has no body
  • Add a test to ensure no Content-Type header is inferred for empty POSTs

Testing

  • Not run (unit test added)

Fixes #1017

Do not add application/x-www-form-urlencoded when a POST/PUT/PATCH request
has no content. Add a test to verify no Content-Type header is inferred
for empty POST requests.

Fixes spring-projects#1017

Signed-off-by: MJY <jmoon0227@gmail.com>
@wilkinsona
Copy link
Member

Duplicates #1018.

@wilkinsona wilkinsona closed this Feb 4, 2026
@wilkinsona wilkinsona added status: duplicate Duplicate of another issue and removed status: waiting-for-triage Untriaged issue labels Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: duplicate Duplicate of another issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HttpRequestSnippet incorrectly infers Content-Type for POST/PUT/PATCH requests without a body

3 participants