kemalcr / kemal

Fast, Effective, Simple Web Framework
https://kemalcr.com
MIT License
3.65k stars 189 forks source link

set Content-Type "text/html" for 500 error by default #610

Closed mamantoha closed 3 years ago

mamantoha commented 3 years ago

Code to reproduce:

require "kemal"

before_all do |env|
  env.response.content_type = "application/json"
end

get "/status" do
  1 // 0
  {"status" => "ok"}.to_json
end

Kemal.run

Before: 01

After: 02

mamantoha commented 3 years ago

CI fail unrelated to these changes

image

mamantoha commented 3 years ago

Closed in favor of https://github.com/kemalcr/kemal/pull/616