Skip to content

REST HTTP response headers have content-type=text/plain #1436

@meltsufin

Description

@meltsufin

Content-Type header should be application/json when JSON is returned, but Showcase always returns text/plain, which causes errors in some environments.

Steps to reproduce

Start the showcase server.

$ curl -v http://localhost:7469/
*   Trying [::1]:7469...
* Connected to localhost (::1) port 7469
> GET / HTTP/1.1
> Host: localhost:7469
> User-Agent: curl/8.4.0
> Accept: */*
> 
< HTTP/1.1 400 Bad Request
< Date: Thu, 18 Jan 2024 19:14:24 GMT
< Content-Length: 119
< Content-Type: text/plain; charset=utf-8
< 
* Connection #0 to host localhost left intact
{"error":{"code":400,"message":"unrecognized request: GET \"/\"","details":null,"Body":"","Header":null,"Errors":null}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions