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


git-svn-id: svn://10.0.0.236/trunk@260335 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkanat%bugzilla.org 2010-05-19 16:34:05 +00:00
parent 75c50437dc
commit c9bcb47d9f
2 changed files with 8 additions and 5 deletions

View File

@ -1 +1 @@
7179 7180

View File

@ -142,10 +142,13 @@ if (defined $cgi->param('rememberedquery')) {
$vars->{'redirect_url'} = "buglist.cgi?".$params->query_string(); $vars->{'redirect_url'} = "buglist.cgi?".$params->query_string();
# If we're running on Microsoft IIS, using cgi->redirect discards # If we're running on Microsoft IIS, $cgi->redirect discards
# the Set-Cookie lines -- workaround is to use the old-fashioned # the Set-Cookie lines. In mod_perl, $cgi->redirect with cookies
# redirection mechanism. See bug 214466 for details. # causes the page to be rendered as text/plain.
if ($ENV{'SERVER_SOFTWARE'} =~ /Microsoft-IIS/ # 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/) || $ENV{'SERVER_SOFTWARE'} =~ /Sun ONE Web/)
{ {
print $cgi->header(-type => "text/html", print $cgi->header(-type => "text/html",