Commit 94998431 authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

Bug 445104: ssl redirects come with a 200 OK HTTP code on mod_perl

Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat
parent 9f35bd3e
...@@ -307,7 +307,11 @@ sub require_https { ...@@ -307,7 +307,11 @@ sub require_https {
$url = $self->self_url; $url = $self->self_url;
$url =~ s/^http:/https:/i; $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; exit;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment