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

Docker versions of 8.1.0 and 8.3.0 return wrong mime type text/html since last image version #144

Closed
Siedlerchr opened this issue Nov 2, 2022 · 3 comments

Comments

@Siedlerchr
Copy link
Contributor

After I did a docker pull last week, suddenly the docker container started to return the wrong mime type text/html instead of application/json.
I see that 8.1.0 was updated 13 days ago:
https://hub.docker.com/layers/fiware/pep-proxy/8.1.0/images/sha256-3a57d2551863a88fc6bdd9a4c7cc7a2771010f81a3c12d7282dc35ec490e240c?context=explore

I also tested 8.3.0, but it exhibits the same behavior.

Using curl it returns:
curl -i --location --request GET 'http://172.18.1.16:1027/v2/entities/urn:ngsi-ld:Test:123456' -H 'Accept: application/json' -H 'Authorization: Bearer 1234'

HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Content-Type: text/html; charset=utf-8
Content-Length: 1005
ETag: W/"3ed-eQEVzw6/98cZxhY/fsr5D/3VJBw"
Date: Wed, 02 Nov 2022 09:42:27 GMT
Connection: keep-alive
Keep-Alive: timeout=5

On another server which I did not yet update, I got the correct response for 8.1.0:
Working version 8.1.0 hash:
"Image": "sha256:1a7a42f75de7c12a2e607c094d4b6e9b7277e17b4b7c44adbc97edab0f8e5835",

curl -i --location --request GET 'http://172.18.1.16:1027/v2/entities/urn:ngsi-ld:Test:123456' -H 'Accept: application/json' -H 'Authorization: Bearer 1234'

HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Length: 1005
Content-Type: application/json
Fiware-Correlator: cca15c68-5a92-11ed-a198-0242ac120114
Date: Wed, 02 Nov 2022 09:43:26 GMT

@Siedlerchr Siedlerchr changed the title Docker 8.1.0 and 8.3.0 return wrong mime type text/html since last image version Docker versions of 8.1.0 and 8.3.0 return wrong mime type text/html since last image version Nov 2, 2022
@Siedlerchr
Copy link
Contributor Author

Siedlerchr commented Nov 8, 2022

@jason-fox Dockerhub shows that you were the latest to push these images. Do you have any idea what could be wrong?

@jason-fox
Copy link
Contributor

The FIWARE version is just a clone of the GING original: https://hub.docker.com/r/ging/fiware-pep-proxy/tags

@jason-fox
Copy link
Contributor

jason-fox commented Nov 8, 2022

It looks like Express has been updated to return Content-type text/html unless explicitly set. It would be a simple PR to fix it.

apozohue10 added a commit that referenced this issue Jun 9, 2023
Fix #144 - Force Content Type to match proxied response.
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

No branches or pull requests

2 participants