Missing header "Content-Type: application/json" in response of POST /build #13148
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Normal behaviour:
The REST POST /build returns with status code 200 as long as the parameters are given properly and the daemon can handle the request. Even in case the Dockerfile can't be processed, the status code is 200. Clients have to parse the response content for errors. It contains an
error
object with the error message in case an error occurred. This is no problem as long as the client knows the content is JSON.The problem:
Some clients need the header "Content-Type application/json" to start parsing. This is the case at least in the fabric8/docker-maven-plugin we're using.
For the fabric8/docker-maven-plugin I filed the issue Plugin doesn't abort building an image in case Podman is used and the Dockerfile can't be processed #1512 and wrote a workaround (fork), commit see that issue.
Is the absence of the header intended or is it missing? If missing, a fix would be nice.
Steps to reproduce the issue:
Create a Dockerfile:
Put the Dockerfile into a tar:
Start the daemon:
Check if the daemon is running, get the unix socket from line "Listen:":
Run the POST /build request. The --unix-socket is the one from the "Listen:" line above.
Describe the results you received:
Describe the results you expected:
Expect "Content-Type: application/json" in the response.
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
No.
But there are no commits between 3.4.2 and 3.4.4 pointing to something about the header.
Additional environment details (AWS, VirtualBox, physical, etc.):
VirtualBox, REHL
The text was updated successfully, but these errors were encountered: