From 13a2c359e7c947884ce85ce58e4697a0826ac3dd Mon Sep 17 00:00:00 2001 From: Scott Walters Date: Thu, 5 May 2011 21:41:18 -0400 Subject: [PATCH] Get rid of the cargo culted code about sending a text reply if the browser didn't specify that it understands HTML. This interacts badly with Plack::Test and doesn't have much of a point in real life anyway, and I accidentally sent the test up that dends on this being gone without sending this too. Argh. If I could send up a coherent commit just once... --- lib/WebGUI/Middleware/StackTrace.pm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/WebGUI/Middleware/StackTrace.pm b/lib/WebGUI/Middleware/StackTrace.pm index 6ff33417f..9c207106f 100644 --- a/lib/WebGUI/Middleware/StackTrace.pm +++ b/lib/WebGUI/Middleware/StackTrace.pm @@ -47,12 +47,7 @@ sub call { my $text = trace_as_string($trace); $env->{'psgi.errors'}->print($text) unless $self->no_print_errors; my $html = eval { trace_as_html($trace, $env->{'webgui.session'}) }; - if ( $html and ($env->{HTTP_ACCEPT} || '*/*') =~ /html/) { - $res = [500, ['Content-Type' => 'text/html; charset=utf-8'], [ utf8_safe($html), @previous_html ] ]; - } else { - $res = [500, ['Content-Type' => 'text/plain; charset=utf-8'], [ utf8_safe($text) ]]; - } - + $res = [500, ['Content-Type' => 'text/html; charset=utf-8'], [ utf8_safe($html), @previous_html ] ]; } return $res;