logo       

Re: Weird bug - Redirect failing when eval inside a DESTROY method: msg#00173

web.mason.user

Subject: Re: Weird bug - Redirect failing when eval inside a DESTROY method


Hi,

this is actually a perl bug:
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2002-09/msg01112.html
It seems that the price for overcoming this bug is a change
of error-handling logic.

--
Yours sincerely,
Vadim.

On 20 Aug 2003, David Boone wrote:

> This is a weird one.. it took me a while to figure it out but I've got
> it down to a fairly basic example. I believe it's a bug unless I'm
> suffering a major brainfart and missing something obvious...
>
> I'll try sum it up as best I can:
>
> <%init>
> my $xyz = new TestObj;
> $m->redirect('test2.html');
> </%init>
>
> The above will fail if TestObj has a DESTROY method, and within that
> DESTROY method is an eval {} block. What will happen is that the
> redirect will fail, and it will carry on with business as usual as far
> as autohandlers are concerned (tho the flush_buffer has already done
> what it's supposed to.) There will be a Location: header in the HTTP
> response as there should be, however the status will be 200 instead of
> 302 or whatever the redirect header is...
>
> I've attached a bunch of files that should reproduce the error (they do
> here in any case.)
>
> Any info would be appreciated... hopefully I've included enough
> information, let me know if any other info is needed.
>
> Apache/1.3.26
> mod_perl/1.27
> Mason/1.21
>
> Thanks!
>
> David Boone
> dave@xxxxxxxxxx
>



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise