Re: redirecting outside the Content handler

2002-11-14 Thread Geoffrey Young


Brett Sanger wrote:

I have a few AccessHandlers that I'd like to redirect the user to the
correct page to get access if they don't have it.  I tried
ErrorDocuments, but I have multiple layers of authentication, and
ErrorDocuments won't cascade.  So I'm looking at switching the
ContentHandler.  internal_redirect() won't work, since it only works as
intended inside the content handler.  Can I just override the currently
expected ContentHandler?  How would I do that?


$r-internal_redirect_handler()

HTH

--Geoff






RE: redirecting outside the Content handler

2002-11-14 Thread Narins, Josh
I think I know this one.

#you might want to do this line, for edification if nothing else
my $list_ref = $r-get_handlers(PerlHandler);

$r-set_handlers('PerlHandler,\My::Package::handler);

-Original Message-
From: Brett Sanger [mailto:brs900;email1.dss.state.va.us]
Sent: Thursday, November 14, 2002 11:45 AM
To: [EMAIL PROTECTED]
Subject: redirecting outside the Content handler


I have a few AccessHandlers that I'd like to redirect the user to the
correct page to get access if they don't have it.  I tried
ErrorDocuments, but I have multiple layers of authentication, and
ErrorDocuments won't cascade.  So I'm looking at switching the
ContentHandler.  internal_redirect() won't work, since it only works as
intended inside the content handler.  Can I just override the currently
expected ContentHandler?  How would I do that?

--
This message is intended only for the personal and confidential use of the designated 
recipient(s) named above.  If you are not the intended recipient of this message you 
are hereby notified that any review, dissemination, distribution or copying of this 
message is strictly prohibited.  This communication is for information purposes only 
and should not be regarded as an offer to sell or as a solicitation of an offer to buy 
any financial product, an official confirmation of any transaction, or as an official 
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be secure or 
error-free.  Therefore, we do not represent that this information is complete or 
accurate and it should not be relied upon as such.  All information is subject to 
change without notice.





Re: redirecting outside the Content handler

2002-11-14 Thread Geoffrey Young


Narins, Josh wrote:

I think I know this one.

#you might want to do this line, for edification if nothing else
my $list_ref = $r-get_handlers(PerlHandler);

$r-set_handlers('PerlHandler,\My::Package::handler);


sorry, I misread when I replied with internal_redirect_handler.

set_handlers() should work. keep in mind that it's current not 
possible (IIRC) to set_handler() for the current phase.  so, for the 
PerlHandler you'd want to do it from someplace else, like your 
PerlAccessHandler or something.

oh, and the syntax doesn't require a coderef -

  $r-set_handlers(PerlHandler = 'My::Package');

works too.

sorry for the confusion.

--Geoff


-Original Message-
From: Brett Sanger [mailto:brs900;email1.dss.state.va.us]
Sent: Thursday, November 14, 2002 11:45 AM
To: [EMAIL PROTECTED]
Subject: redirecting outside the Content handler


I have a few AccessHandlers that I'd like to redirect the user to the
correct page to get access if they don't have it.  I tried
ErrorDocuments, but I have multiple layers of authentication, and
ErrorDocuments won't cascade.  So I'm looking at switching the
ContentHandler.  internal_redirect() won't work, since it only works as
intended inside the content handler.  Can I just override the currently
expected ContentHandler?  How would I do that?

--
This message is intended only for the personal and confidential use of the designated recipient(s) named above.  If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited.  This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers.  Email transmission cannot be guaranteed to be secure or error-free.  Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such.  All information is subject to change without notice.







Re: redirecting outside the Content handler

2002-11-14 Thread Brett Sanger
Narins, Josh wrote:
 
 I think I know this one.
 
 #you might want to do this line, for edification if nothing else
 my $list_ref = $r-get_handlers(PerlHandler);
 
 $r-set_handlers('PerlHandler,\My::Package::handler);

Excellent!  Thanks.  One associated question:  Is it possible to
manipulate things such that I'm calling an Apache::Registry script?  I
can make a handle to redirect, but I'm sure that isn't necessary.  The
Eagle book only mentioned direct handlers.



Re: redirecting outside the Content handler

2002-11-14 Thread Brett Sanger
  $r-set_handlers('PerlHandler,\My::Package::handler);
 
 set_handlers() should work. keep in mind that it's current not
 possible (IIRC) to set_handler() for the current phase.  so, for the
 PerlHandler you'd want to do it from someplace else, like your
 PerlAccessHandler or something.

Which is ideal for me, since I'm trying to set it in the
PerlAccessHandler

 oh, and the syntax doesn't require a coderef -
$r-set_handlers(PerlHandler = 'My::Package');
 works too.

Each of these:

$r-set_handlers(PerlHandler = 'My::Package');
$r-set_handlers(PerlHandler = 'My::Package::handler');
$r-set_handlers(PerlHandler = \My::Package);
$r-set_handlers(PerlHandler = \My::Package::handler);

give me:
 [error] Can't set_handler with that value

Any ideas?

(I've also tried the same variations on 
$r-set_handlers(PerlHandler =
'Apache::ROOT::path::to::myscript_23pl');
to try and convince it to load my Apache::Registry scripts, with the
same results
)



Re: redirecting outside the Content handler

2002-11-14 Thread Geoffrey Young


Each of these:

$r-set_handlers(PerlHandler = 'My::Package');
$r-set_handlers(PerlHandler = 'My::Package::handler');
$r-set_handlers(PerlHandler = \My::Package);
$r-set_handlers(PerlHandler = \My::Package::handler);

give me:
 [error] Can't set_handler with that value

Any ideas?


yeah, sorry.  push_handlers() takes a scalar, set_handlers() takes an 
array reference:

$r-set_handlers(PerlHandler = ['My::Package']);
$r-set_handlers(PerlHandler = [\My::Package]);

etc.

--Geoff