canShowDebug checked for a literal string, 'text/html' in order to generate

the debug output.  When the default mimetype was changed to text/html; charset=UTF-8,
the literal check always failed.

There are probably a few more of these floating around.
This commit is contained in:
Colin Kuskie 2006-11-17 22:00:35 +00:00
parent adace63acf
commit 5e074e0939
2 changed files with 4 additions and 1 deletions

View file

@ -85,7 +85,7 @@ Returns true if the user meets the condition to see debugging information and de
sub canShowDebug {
my $self = shift;
return 0 unless ($self->session->setting->get("showDebug"));
return 0 unless ($self->session->http->getMimeType eq "text/html");
return 0 unless (substr($self->session->http->getMimeType(),0,9) eq "text/html");
return 1 if ($self->session->setting->get("debugIp") eq "");
my $ips = $self->session->setting->get("debugIp");
$ips =~ s/\s+//g;