You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Will Fould <wi...@gmail.com> on 2007/01/17 01:45:10 UTC

Redirects?

I have a strange issue with a particular script that sometimes (often)
generates a 302 to another script without a clear reason why.

Oddly enough, I simply placed a few "warn('blah')" code snippets to crudely
determine from the error log where it was happening in production (because I
cannot replicate the issue in development (linux client/local server)) but
with the Warn() statements, if seems to no longer happen !! -- any
suggestions/clues where I might look?  This is the only script that does
this under the same location/configuration.

Thank you for a tiny piece of your sanity

-W

Re: Redirects?

Posted by Robert Landrum <rl...@aol.net>.
Will Fould wrote:
> I have a strange issue with a particular script that sometimes (often) 
> generates a 302 to another script without a clear reason why.
> 
> Oddly enough, I simply placed a few "warn('blah')" code snippets to 
> crudely determine from the error log where it was happening in 
> production (because I cannot replicate the issue in development (linux 
> client/local server)) but with the Warn() statements, if seems to no 
> longer happen !! -- any suggestions/clues where I might look?  This is 
> the only script that does this under the same location/configuration.
>  

Could this be an issue with buffering?  The warns might be triggering a 
buffer flush.

$|=1 might solve the issue once the warns are removed.

Rob

Re: Redirects?

Posted by Bill Whillers <mo...@whohasit.com>.
Assuming your not re-using session variables, you might want to verify that 
your package names do not conflict and that your conditions for any redirects 
are not confused.  I remember fighting this in a previous life.

B

On Wednesday 17 January 2007 08:24, Perrin Harkins wrote:
> On Tue, 2007-01-16 at 16:45 -0800, Will Fould wrote:
> > I have a strange issue with a particular script that sometimes (often)
> > generates a 302 to another script without a clear reason why.
>
> Are you saying that you don't have any code in the script that generates
> redirects, but they sometimes happen anyway?  That would mean you're
> really getting them from somewhere else, like an auth handler or
> mod_dir.
>
> - Perrin

Re: Redirects?

Posted by Perrin Harkins <pe...@elem.com>.
On Tue, 2007-01-16 at 16:45 -0800, Will Fould wrote:
> I have a strange issue with a particular script that sometimes (often)
> generates a 302 to another script without a clear reason why.

Are you saying that you don't have any code in the script that generates
redirects, but they sometimes happen anyway?  That would mean you're
really getting them from somewhere else, like an auth handler or
mod_dir.

- Perrin


Re: Redirects?

Posted by to...@tuxteam.de.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, Jan 16, 2007 at 04:45:10PM -0800, Will Fould wrote:
> I have a strange issue with a particular script that sometimes (often)
> generates a 302 to another script without a clear reason why.
> 
> Oddly enough, I simply placed a few "warn('blah')" [...] [it] seems to no
> longer happen !!

Heh. Tough riddle, if you tell us so little ;-)

A timing dependency, aka race condition comes first to mind. Then it
might be as well some undefined variable which gets somehow straightened
on issuing the warn. Or small little green gremlins which run away in
horror when they hear the log files churning.

How does the redirect get generated in the script? I mean: at which
places does the script generate the 302 response and where does it come
from? (you might instrument those places to log a stack dump to shed
some light on the issue).

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFFrdCIBcgs9XrR2kYRAnMaAJ0csiMgyXKDwd+RwuoUwcIxxFOTZQCfcMSz
pKo4+71MJ4jYjsOk/BLU+JA=
=hFej
-----END PGP SIGNATURE-----