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

Content-Type for 404 responses is always text/html #235

Closed
2 tasks done
mefellows opened this issue Sep 19, 2018 · 0 comments
Closed
2 tasks done

Content-Type for 404 responses is always text/html #235

mefellows opened this issue Sep 19, 2018 · 0 comments
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@mefellows
Copy link
Member

Pre issue-raising checklist

I have already (please mark the applicable with an x):

  • Upgraded to the latest Pact Broker OR
  • Checked the CHANGELOG to see if the issue I am about to raise has been fixed

Expected behaviour

When requesting a resource that does not exist, the response content-type should be application/hal+json (unless text/html was explicitly requested).

Actual behaviour

Content-Type is text/html:

< HTTP/1.1 404 Not Found
< Content-Type: text/html
< Content-Length: 219
< Date: Wed, 19 Sep 2018 06:13:59 GMT
< Server: Webmachine-Ruby/1.5.0 Rack/1.3
< X-Pact-Broker-Version: 2.24.0
< X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< Connection: keep-alive
<
<!DOCTYPE html><html>
 <head><title>404 Not Found</title></head>
 <body><h1>404 Not Found</h1>
 <p>The requested document was not found on this server.</p>
 <address>Webmachine-Ruby/1.5.0 server</address></body></html>
* Connection #0 to host localhost left intact

Steps to reproduce

# Run broker
curl localhost:9292/pacticipants/i-dont-exist
@mefellows mefellows added bug Indicates an unexpected problem or unintended behavior dev_done_not_released labels Sep 19, 2018
bethesque added a commit that referenced this issue Sep 20, 2018
…-for-404

fix(content-type): convert 404 content-type to application/hal+json #235
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant