On Tue, May 01, 2001 at 01:58:56PM -0400, Chris Strom wrote:
> > > I can't say as I've had any problems using
> > > err_headers_out->add("Set-Cookie") with any browsers. I'm
> > > surprised to hear that you've had problems with it.
> >
> > even DURING a redirect? i seem to have hit a chord here, as
> > i'm getting lots of "me too" in my mailbox.
>
> Even during a redirect. The following works for me (in a PerlInitHandler
> NOT a PerlAccessHandler) with lynx (2.7) just fine.
>
> $r->err_headers_out->add('Location' => $dest);
> $r->err_headers_out->add('Set-Cookie' => $cookie);
>
> $log->debug("Authentication successful. Redirecting to $dest");
> return REDIRECT;
okay, i'll try that, too. expectations low, from experience. :/
> > something else i'm trying now is
> >
> > $r->set_handlers(PerlHandler => undef);
> > $r->push_handlers( PerlHandler => sub { ...print "<meta
> > http-equiv...
>
> This ought to work and is a little more conceptually clean that what you
> were trying to accomplish with redirects and printing content in the
> PerlAccessHandler. Still, my gut feeling is that it's better to move the
> handler up the chain to a PerlInitHandler and do simple redirects there.
> Obviously it's preferable to perform access checks in PerlAccessHandlers,
> but sometimes you do need to set a cookie when doing redirects.
hmm. implying that cookie-setting gets borked in accesshandlers?
(mine sure do.)
> > but THIS for some reason redirects the browser back to itself,
> > instead of to the login area. the protected area is "/protected"
> > and the login area is "/login" so the http-equiv tag looks like
> > <meta http-equiv="Refresh" content="0;
> http://www.fricking-site.com/login">
> but it cycles back to www.cannot-get-in.com/protected instead... !
>
> Are you setting HTTP headers?
% telnet no-way-in-hell-bubba.com 80
Trying ##.##.##.##...
Connected to no-way-in-hell-bubba.com.
Escape character is '^]'.
GET /protected HTTP/1.1
Host: no-way-in-hell-bubba.com
i ask for /protected on lunacy-for-lunch.com server, and get
HTTP/1.1 200 OK
Date: Tue, 01 May 2001 18:33:43 GMT
Server: Apache/1.3.9
Set-Cookie: request_uri=http%3A%2F%2Fno-way-in-hell-bubba.com%2Fprotected;
domain=.no-way-in-hell-bubba.com; path=/
Transfer-Encoding: chunked
Content-Type: text/html; charset=ISO-8859-1
148
<head><meta http-equiv="Refresh" content="2;
http://www.no-way-in-hell-bubba.com/login/">
<title>Not logged in</title></head>
<body bgcolor=white>
<h1>Gotta log in, first</h1>
<p>You're being redirected to <a
href="http://www.no-way-in-hell-bubba.com/login">http://www.no-way-in-hell-bubba.com/login</a>
in just a moment.</p>
<h2>Please stand by...</h2>
</body></html>
from my understanding, which gets shakier by the minute, the
headers and http-equiv are all correct. but lynx and netscape
both bounce like hell right back to /protected ad nauseum.
as if the meta tag was
<meta http-equiv="refresh" content="2; http://yada-yada.com/protected">
which it's not.
next i'll be taking up russian roulette. (i'll leave one chamber
empty, for sport.)
--
don't visit this page. it's bad for you. take my expert word for it.
http://www.salon.com/people/col/pagl/2001/03/21/spring/index1.html
[EMAIL PROTECTED]
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!