summaryrefslogtreecommitdiffstats
path: root/colchange.cgi
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-05-19 18:24:59 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-05-19 18:24:59 +0200
commitd614dd98c482a06459f5f6e4911e0f32de6c424b (patch)
tree10a2bee5d81e36a2c057f03982b04d8eceb57442 /colchange.cgi
parent1b3cfca0a66dd40ceb69a8fc514cc94910c6d69e (diff)
downloadbugzilla-d614dd98c482a06459f5f6e4911e0f32de6c424b.tar.gz
bugzilla-d614dd98c482a06459f5f6e4911e0f32de6c424b.tar.xz
Bug 376044: If we're running under mod_perl, use a refresh-style redirect
when coming back from colchange.cgi, because CGI.pm sometimes does not send headers properly under mod_perl when redirecting and sending cookies at the same time. r=justdave, a=mkanat
Diffstat (limited to 'colchange.cgi')
-rwxr-xr-xcolchange.cgi11
1 files changed, 7 insertions, 4 deletions
diff --git a/colchange.cgi b/colchange.cgi
index 7aef965de..0bd3af481 100755
--- a/colchange.cgi
+++ b/colchange.cgi
@@ -142,10 +142,13 @@ if (defined $cgi->param('rememberedquery')) {
$vars->{'redirect_url'} = "buglist.cgi?".$params->query_string();
- # If we're running on Microsoft IIS, using cgi->redirect discards
- # the Set-Cookie lines -- workaround is to use the old-fashioned
- # redirection mechanism. See bug 214466 for details.
- if ($ENV{'SERVER_SOFTWARE'} =~ /Microsoft-IIS/
+ # If we're running on Microsoft IIS, $cgi->redirect discards
+ # the Set-Cookie lines. In mod_perl, $cgi->redirect with cookies
+ # causes the page to be rendered as text/plain.
+ # Workaround is to use the old-fashioned redirection mechanism.
+ # See bug 214466 and bug 376044 for details.
+ if ($ENV{'MOD_PERL'}
+ || $ENV{'SERVER_SOFTWARE'} =~ /Microsoft-IIS/
|| $ENV{'SERVER_SOFTWARE'} =~ /Sun ONE Web/)
{
print $cgi->header(-type => "text/html",