Skip to content

Stop declaring a content type on a response without a body. - #69

Merged
gustavofreze merged 2 commits into
mainfrom
fix/no-content-content-type
Sep 10, 2026
Merged

Stop declaring a content type on a response without a body.#69
gustavofreze merged 2 commits into
mainfrom
fix/no-content-content-type

Conversation

@gustavofreze

Copy link
Copy Markdown
Member

Please follow the contributing guidelines.

Summary

What this pull request does.

Related issue

Closes #...

Checklist

  • Tests added or updated.
  • Documentation updated when applicable.
  • make review passes.
  • make tests passes.

Response::noContent() stamped the application/json default on a
zero-length body, which announces a payload that is not there and
leads a strict client to parse zero bytes. The default belongs to
responses that carry something to describe, so createWithoutBody
merges the caller headers as given, and a ContentType passed by the
caller still survives.
@gustavofreze
gustavofreze merged commit 7a7ffcc into main Sep 10, 2026
5 checks passed
@gustavofreze
gustavofreze deleted the fix/no-content-content-type branch September 10, 2026 15:17
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.

1 participant