From e3ea5c39b74fcd0f759dae2c1242dcfc4cb7c2c4 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Thu, 24 Jul 2008 21:03:25 +0000 Subject: [PATCH] Bug 445104: ssl redirects come with a 200 OK HTTP code on mod_perl Patch By Max Kanat-Alexander r=dkl, a=mkanat --- Bugzilla/CGI.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm index 4c62ab3ac7..0de89408e4 100644 --- a/Bugzilla/CGI.pm +++ b/Bugzilla/CGI.pm @@ -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; } -- 2.47.2