From 949984314ceb7f076ed991c2648585a91df7fdeb Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Thu, 24 Jul 2008 21:01:08 +0000 Subject: 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 4c62ab3ac..0de89408e 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; } -- cgit v1.2.3-24-g4f1b