mirror of https://github.com/grafana/grafana
CallResource: don't set Content-Type header if status is 204 (#50780)
Grafana's HTTPServer ensures that the Content-Type header is always set in the response to a CallResource call, but when the status code is 204 No Content this shouldn't be done; the body should be empty and no Content-Type header should be set. We ran into this in the Grafana ML plugin where we were sending an empty response with status 204, but the frontend client saw that the content type was JSON and tried to parse it, resulting in an error that made it to the JS console.pull/58358/head
parent
43436bd6f0
commit
480277f612
Loading…
Reference in new issue