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

compat: endpoint /build must set header content type as application/json in response header. #13156

Conversation

flouthoc
Copy link
Collaborator

@flouthoc flouthoc commented Feb 7, 2022

Lot of clients are expecting proper Content-type: application/json
configured in response headers of /build compat api. Following commit
fixes that.

Fixes issues where code is setting header field after writing header
which does not seems correct. We must set content-type before we write and flush
http header.

Closes: #13148

…son in reponse

Lot of clients are expecting proper `Content-type: application/json`
configured in response headers of `/build` compat api. Following commit
fixes that.

Fixes issues where code is setting header field after writing header
which is wrong. We must set `content-type` before we write and flush
http header.

Signed-off-by: Aditya R <arajan@redhat.com>
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 7, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 7, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flouthoc, zhangguanzhang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [flouthoc,zhangguanzhang]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@zhangguanzhang
Copy link
Collaborator

LGTM

@rhatdan
Copy link
Member

rhatdan commented Feb 7, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 7, 2022
@rhatdan rhatdan added the 4.0 label Feb 7, 2022
@openshift-merge-robot openshift-merge-robot merged commit 46d9a25 into containers:main Feb 7, 2022
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing header "Content-Type: application/json" in response of POST /build
4 participants