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...
This commit is contained in:
Scott Walters 2011-05-05 21:41:18 -04:00
parent 6b0cd93e61
commit 13a2c359e7

View file

@ -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;