cloudfoundry / notifications

The notifications service component of Cloud Foundry
Apache License 2.0
17 stars 22 forks source link

Wrong returning content type of "text/plain" on /templates path #12

Open JaysonBH opened 6 years ago

JaysonBH commented 6 years ago

Notifications is returning the wrong content type of "text/plain" on http://notifications.$CF_APP_DOMAIN/templates path where it should be "application/json" since it is sending json output.

This is causing browsers and the uaac from formatting the output correctly.

Example:

uaac curl -k https://notifications.$CF_APP_DOMAIN/templates -X GET
GET https://notifications.$CF_APP_DOMAIN/templates

200 OK
RESPONSE HEADERS:
  Content-Length: 136
  Content-Type: text/plain; charset=utf-8
  Date: Tue, 27 Mar 2018 21:02:08 GMT
  X-Vcap-Request-Id: b0e5ec43-b322-49f8-76f8-d72739fe72d3
  Connection: close
RESPONSE BODY:
{"3bfc197f-70d6-c1e2-ca58-c8f764e240c1":{"name":"site-maintenance"},"a343caf7-caa1-346d-3d99-7b4ddc1a1899":{"name":"site-maintenance1"}}

Where text/plain should be application/json.

cf-gitbot commented 6 years ago

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.