lib/wunderbar/cgi-methods.rb in wunderbar-1.0.11 vs lib/wunderbar/cgi-methods.rb in wunderbar-1.0.12

- old
+ new

@@ -9,11 +9,11 @@ 'Cache-Control' => 'no-cache' } builder = JsonBuilder.new(scope) output = builder.encode(&block) headers['status'] = "404 Not Found" if output == {} rescue Exception => exception - headers['status'] = "500 Internal Server Error" + headers['status'] = "531 Internal Server Error" builder._! Hash.new unless builder.target? Hash builder._exception exception ensure out?(scope, headers) { builder.target! } end @@ -23,11 +23,11 @@ headers = {'type' => 'text/plain', 'charset' => 'UTF-8'} builder = TextBuilder.new(scope) output = builder.encode(&block) headers['status'] = "404 Not Found" if output == '' rescue Exception => exception - headers['status'] = "500 Internal Server Error" + headers['status'] = "531 Internal Server Error" builder._exception exception ensure out?(scope, headers) { builder.target! } end @@ -99,10 +99,10 @@ output = html2pdf {x.html *args, &block} else output = x.html *args, &block end rescue ::Exception => exception - headers['status'] = "500 Internal Server Error" + headers['status'] = "531 Internal Server Error" x.clear! output = x.html(*args) do _h1 'Internal Server Error' _exception exception end