]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 376044: If we're running under mod_perl, use a refresh-style redirect
authorMax Kanat-Alexander <mkanat@bugzilla.org>
Wed, 19 May 2010 16:26:38 +0000 (09:26 -0700)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Wed, 19 May 2010 16:26:38 +0000 (09:26 -0700)
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

colchange.cgi

index f8ba353e47bf650037338d0e4d98a3c1a5ba95c5..9c9addb48e14717273f0cd7cef1228163b968bb0 100755 (executable)
@@ -150,10 +150,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",