Skip to content

fix: Keep the JSON content type when a response carries another header. - #66

Merged
gustavofreze merged 2 commits into
mainfrom
fix/response-keeps-json-content-type
Aug 18, 2026
Merged

fix: Keep the JSON content type when a response carries another header.#66
gustavofreze merged 2 commits into
mainfrom
fix/response-keeps-json-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.
  • composer review passes.
  • composer tests passes.

The default was applied only when no header was passed at all, so a
response built with a Link or a Cache-Control header lost it and PHP
fell back to its own text/html default. The pagination example in the
README produced JSON labelled as text/html.

The default is now a base that supplied headers add to, and a supplied
content type still replaces it rather than appending a second value.
The workflow installed its own PHP through setup-php, so CI and a
developer could run different runtimes with nothing to reveal the drift.
It now reads the image from make show-image, which leaves the Makefile as
the single declaration of what PHP runs on, derived from the version in
composer.json.
@gustavofreze
gustavofreze merged commit 41c2dc9 into main Aug 18, 2026
5 checks passed
@gustavofreze
gustavofreze deleted the fix/response-keeps-json-content-type branch August 18, 2026 01:20
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