From: mkanat%bugzilla.org <> Date: Thu, 24 Jul 2008 21:03:25 +0000 (+0000) Subject: Bug 445104: ssl redirects come with a 200 OK HTTP code on mod_perl X-Git-Tag: bugzilla-3.2rc1~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3ea5c39b74fcd0f759dae2c1242dcfc4cb7c2c4;p=thirdparty%2Fbugzilla.git Bug 445104: ssl redirects come with a 200 OK HTTP code on mod_perl Patch By Max Kanat-Alexander r=dkl, a=mkanat --- 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; }