Re: More CGIHandler problems

Dave Rolsky <[email protected]>
Newsgroups gmane.comp.web.mason.devel
Message-ID <[email protected]>
On Thu, 11 Mar 2004, David Wheeler wrote:

> Well, the MasonX::Interp::WithCallback CGI tests still don't pass. If
> you look at t/09cgi.t, you'll see that the last few tests execute
> redirects. These worked in Mason 1.24 because it properly caught an
> abort exception and called CGI->redirect, thus setting the proper
> headers. However, they're not longer getting set. In fact, it's no
> longer setting headers that I've set up in the callback by calling
> $r->header_out.
>
> So that's the problem as I see it. No headers are being sent, and they
> should be sent, IMO.
>
> Now, looking at CGIHandler.pm, it looks like your custom output method
> should send them. Any idea why it doesn't?

It doesn't send them because no output is being generated.  You're
aborting before $m->print could ever be called.

I added some explicit support for redirect aborts.  This is a bit of a
hack, and really should be fixed in the dev code by setting a Status
header for _all_ return codes, but I wanted to make the minimal changes
necessary.

Anyway, all of the 09cgi.t tests now pass with the latest CVS code on the
stable branch.  And of course, the Mason core tests still pass as well, so
I think we're good to go.


-dave

/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.