You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "rich@cre8tivegroup.com" <ri...@cre8tivegroup.com> on 2001/06/01 16:03:39 UTC

Re: Getting the wrong URL

OK, I think I have solved this problem, but I would like to run my solution by
you folks, and see if it makes any sense. What we found, on a more thorough
code review, was that a number of the handlers were doing a redirect by calling
send_cgi_header, and then exit()'ing. It seemed to us that the exit would kill
the Perl interp, and the Apache child would then just keep serving whatever it
had in its buffer at the time. Does that make any sense? If so, will die() have
the same results? I started grepping for exit everywhere, and removed it, but
along the way I saw a number of places that we're calling die.

I expect that this is just a really stupid newbie problem - I've only been
doing mod_perl stuff for about 6 months or so. And, in fact, once it occurred
to me that this might be the problem, of course I found it in the FAQ.

-- 
Rich Bowen - Author - Apache Server Unleashed
http://www.apacheunleashed.com/



Re: Getting the wrong URL

Posted by Chris Strom <cs...@cos.com>.
"rich@cre8tivegroup.com" <ri...@cre8tivegroup.com> writes:

> OK, I think I have solved this problem, but I would like to run my solution by
> you folks, and see if it makes any sense. What we found, on a more thorough
> code review, was that a number of the handlers were doing a redirect by calling
> send_cgi_header, and then exit()'ing. It seemed to us that the exit would kill
> the Perl interp, and the Apache child would then just keep serving whatever it
> had in its buffer at the time. Does that make any sense? If so, will die() have
> the same results? I started grepping for exit everywhere, and removed it, but
> along the way I saw a number of places that we're calling die.
> 
> I expect that this is just a really stupid newbie problem - I've only been
> doing mod_perl stuff for about 6 months or so. And, in fact, once it occurred
> to me that this might be the problem, of course I found it in the FAQ.

In case you haven't found the guide yet:
http://perl.apache.org/guide/porting.html#Terminating_requests_and_process
http://perl.apache.org/guide/porting.html#die_and_mod_perl

> 
> -- 
> Rich Bowen - Author - Apache Server Unleashed
> http://www.apacheunleashed.com/
> 


Re: Getting the wrong URL

Posted by Doug MacEachern <do...@covalent.net>.
On 1 Jun 2001, rich@cre8tivegroup.com wrote:

> OK, I think I have solved this problem, but I would like to run my solution by
> you folks, and see if it makes any sense. What we found, on a more thorough
> code review, was that a number of the handlers were doing a redirect by calling
> send_cgi_header, and then exit()'ing. It seemed to us that the exit would kill
> the Perl interp, and the Apache child would then just keep serving whatever it
> had in its buffer at the time. Does that make any sense? If so, will die() have
> the same results? I started grepping for exit everywhere, and removed it, but
> along the way I saw a number of places that we're calling die.

i'm missing the original message, but if you can post a small test case,
along with results and expected results, we can look into it.


Re: Getting the wrong URL

Posted by Stas Bekman <st...@stason.org>.
On 1 Jun 2001, rich@cre8tivegroup.com wrote:

> OK, I think I have solved this problem, but I would like to run my solution by
> you folks, and see if it makes any sense. What we found, on a more thorough
> code review, was that a number of the handlers were doing a redirect by calling
> send_cgi_header, and then exit()'ing. It seemed to us that the exit would kill
> the Perl interp, and the Apache child would then just keep serving whatever it
> had in its buffer at the time. Does that make any sense? If so, will die() have
> the same results? I started grepping for exit everywhere, and removed it, but
> along the way I saw a number of places that we're calling die.

I don't think it makes any sense. Also you could look at the handlers
running for each request using Apache::ShowRequest. I think it's mentioned
somewhere in the guide too.

> I expect that this is just a really stupid newbie problem - I've only been
> doing mod_perl stuff for about 6 months or so. And, in fact, once it occurred
> to me that this might be the problem, of course I found it in the FAQ.
>
> --
> Rich Bowen - Author - Apache Server Unleashed
> http://www.apacheunleashed.com/
>
>



_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:stas@stason.org   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/