Skip to content

[6.x.x] Add media type to writeResultJSON response header#222

Merged
adamretter merged 2 commits into
develop-6.x.xfrom
6.x.x/hotfix/json-response
Jun 3, 2026
Merged

[6.x.x] Add media type to writeResultJSON response header#222
adamretter merged 2 commits into
develop-6.x.xfrom
6.x.x/hotfix/json-response

Conversation

@adamretter

Copy link
Copy Markdown
Member

Backport of #212

RESTServer#writeResultJSON Ignores the XQuery Serialization output media type setting and does not set the Content Type correctly in the HTTP Response, this PR fixes that, and enables support for:

util:declare-option("output:media-type", "application/json")
declare option output:media-type "application/json";

This PR also adds tests for RESTService to make sure it returns the correct Content-Type headers and prioritize it over the request Accept headers.

@adamretter adamretter added this to the elemental-6.10.1 milestone Jun 3, 2026
@adamretter adamretter self-assigned this Jun 3, 2026
@adamretter adamretter added the bug Something isn't working label Jun 3, 2026
@cla-bot cla-bot Bot added the cla-signed label Jun 3, 2026
@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@adamretter adamretter merged commit e785fb3 into develop-6.x.x Jun 3, 2026
10 of 13 checks passed
@adamretter adamretter deleted the 6.x.x/hotfix/json-response branch June 3, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cla-signed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants