At 12:21 2002-02-13 -0800, Gisle Aas wrote:
[I report a problem, guess at a solution, and Gisle replies]
>Feels like too much special casing of cookies to me. How about if we
>simply remove the
>
> $r->request->url->as_string eq $referral_uri->as_string
>
>test and only have a counter to protect us agains infinite loops.
>
>We might want to make 13 configurable :)
Oh, good idea. I was thinking that request/reply pairs were so very
expensive, but now it occurs to me that redirect reply is pretty much
always a tiny buch of headers.
How about adding a $self->redirect_tolerance attribute (with
default value of something like 13), and then change the test
to this?
if(++$count > $self->redirect_tolerance ||
(
$self->cookie_jar ?
"" : # If we're cookielicious, /don't/ assume that
# having the same URL makes the requests idempotent.
($r->request->url->as_string eq $referral_uri->as_string)
)
) {
$response->header("Client-Warning" =>
"Redirect loop detected");
return $response;
}
--
Sean M. Burke [EMAIL PROTECTED] http://www.spinn.net/~sburke/