]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 445104: ssl redirects come with a 200 OK HTTP code on mod_perl
authormkanat%bugzilla.org <>
Thu, 24 Jul 2008 21:03:25 +0000 (21:03 +0000)
committermkanat%bugzilla.org <>
Thu, 24 Jul 2008 21:03:25 +0000 (21:03 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat

Bugzilla/CGI.pm

index 4c62ab3ac78413b4041748bc02672cc3e3813efe..0de89408e4500f6daf7005dd568b85a8e352ca0b 100644 (file)
@@ -307,7 +307,11 @@ sub require_https {
         $url = $self->self_url;
         $url =~ s/^http:/https:/i;
     }
-    print $self->redirect(-location => $url, -status => $status). "\n";
+    print $self->redirect(-location => $url, -status => $status);
+    # When using XML-RPC with mod_perl, we need the headers sent immediately.
+    # We used to do this by appending a newline to $self->redirect, but
+    # that breaks normal web browser redirects.
+    $self->r->rflush if $ENV{MOD_PERL};
     exit;
 }