]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 214466: Cookie setting w/ 3xx redirect broken on IIS - make colchange use Refresh...
authorjouni%heikniemi.net <>
Wed, 19 Nov 2003 14:29:20 +0000 (14:29 +0000)
committerjouni%heikniemi.net <>
Wed, 19 Nov 2003 14:29:20 +0000 (14:29 +0000)
colchange.cgi

index 9ffda83d62ed1788c3cdf3288da8aad2e60d24e6..726e60d510a5cc692ba559b10e952664fe7dd5f7 100755 (executable)
@@ -104,7 +104,17 @@ if (defined $::FORM{'rememberedquery'}) {
 
     $vars->{'message'} = "change_columns";
     $vars->{'redirect_url'} = "buglist.cgi?$::FORM{'rememberedquery'}";
-    print $cgi->redirect($vars->{'redirect_url'});
+
+    # 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/) {
+      print $cgi->header(-type => "text/html",
+                         -refresh => "0; URL=$vars->{'redirect_url'}");
+    } else {
+      print $cgi->redirect($vars->{'redirect_url'});
+    }
+    
     $template->process("global/message.html.tmpl", $vars)
       || ThrowTemplateError($template->error());
     exit;