Re: CGIHandler Changes
David Wheeler <[email protected]>
| Newsgroups | gmane.comp.web.mason.devel |
|---|---|
| Message-ID | <[email protected]> |
On Dec 22, 2003, at 6:04 PM, David Wheeler wrote:
> * More importantly, it seems like the out_method is never executed if
> a request aborts -- such as on a redirect. Or at least, it doesn't
> execute if nothing is output before the abort. Thus the headers are
> never sent! Or something like that. I just tried to write a test for
> 14-cgi.t, and it output the headers. Maybe it's because
> MasonX::Interp::WithCallbacks aborts before it execs the request?
> Anyway, I'm not sure what the issue is, but it worked fine with Mason
> 1.24.
Oh, I realize why now. I'm installing my own out_method. It was a
simple scalar, but as of 1.25, that doesn't work because the custom
out_method CGIHandler now only sends headers in its own handler.
However, when I create a new custom handler that sends headers myself,
like this:
my $out_method = sub {
HTML::Mason::Request->instance->cgi_request->send_http_header
unless $sent_headers;
$sent_headers = 1;
$outbuf .= join '', @_;
};
It still doesn't send the headers if I redirect. Is there some other
way we can get CGIHandler to send the headers?
Thanks,
David
--
David Wheeler AIM: dwTheory
[email protected] ICQ: 15726394
http://www.kineticode.com/ Yahoo!: dew7e
Jabber: [email protected]
Kineticode. Setting knowledge in motion.[sm]
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click