From 5e074e0939e19e331515e903fbb75ca6d1fdf33b Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 17 Nov 2006 22:00:35 +0000 Subject: [PATCH] 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. --- docs/changelog/7.x.x.txt | 3 +++ lib/WebGUI/Session/ErrorHandler.pm | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 76cb9d277..8a670467a 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,3 +1,6 @@ +7.2.2 + - fix: Show Debugging option not working + 7.2.1 - Made a change to version tag commits to deal with unusually long commit times. diff --git a/lib/WebGUI/Session/ErrorHandler.pm b/lib/WebGUI/Session/ErrorHandler.pm index 9e5b8656a..02db3288d 100644 --- a/lib/WebGUI/Session/ErrorHandler.pm +++ b/lib/WebGUI/Session/ErrorHandler.pm @@ -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;