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

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

Open
meltsufin opened this issue Jan 18, 2024 · 0 comments
Open

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

meltsufin opened this issue Jan 18, 2024 · 0 comments
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@meltsufin
Copy link
Member

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}}
@meltsufin meltsufin added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

1 participant