Forward-page ugliness solved (patch from Martin Ertl)
Joel Palmius <[email protected]>
| Newsgroups | gmane.comp.apache.mod-survey.general |
|---|---|
| Message-ID | <[email protected]> |
Yesterday I received a surprisingly small patch for solving the ugly
forward-page things which has been discussed for years. Personally I was
thinkins about changing significant parts of the code structure to solve
the problem, but Martin pointed out that all one needs do is to use the
"Location" header instead.
I have merged and tested his patch (with some minor style modifications of
my own). It works beautifully for me on apache 2.
Technically, the Submit module now sets the Location header before
printing the meta/redirect html tags. Thus, every browser which
understands the Location should be redirected immediately, while browsers
which don't should be able to fall back on the HTML equivalent.
In SubmitMsg()
..
$doc->{HANDLER}->headers_out->set('Location' => $redirectUrl);
$doc->{HANDLER}->status(REDIRECT);
..
The code is in CVS. As said it works for me on apache 2, but I would
appreciate if people with apache 1 test it too (Otherwise I'd have to
install apache 1 on some machine again. :-) ). Also, testing with
different browsers just to be sure would be nice.
A big thanks to Martin who saved me tons of work.
// Joel
Skickat av Joel Palmius <[email protected]>
till survey-discussion