From: Doug MacEachern <[EMAIL PROTECTED]>
> > I've found that if I post to this PerlAccessHandler, I get no response:
> this problem is fixed in 1.25, from Changes:
> "fix $r->read() so it will not block if all data has already been read
> and so that Apache will not hang during ap_discard_request_body() on
> error or redirect after all data has been read"


> > From: David Young <[EMAIL PROTECTED]>
DY> What I am actually doing is extending the cookie-based access
DY> control ("TicketMaster") outlined in the Apache Modules book[1]. If the
DY>  user attempts to access a restricted area and they don't have a cookie,
they
DY>  are redirected to a login page (courtesy of an ErrorDocument 403). Upon
DY> submission (POST) of the login page, if their credentials are good, they
are
DY> redirected to their original destination.

OK, this makes sence. I just did something like this myself. I was
redirecting the user to change the URI that they saw in the browser, but
didn't want to loose POSTed data. Since you are using mod_perl, you can
catch STDIN inside of a handler with:
  $data = $STDIN

>From there, I stored the data in a file and redirected the user. When the
user has all of the auth work finished and finally makes it back to the
right location, I read in the data from that file and assign to STDIN with:
  read(TEMP_FILE, $STDIN, (-s $temp_file))

This works fine, but you'll obviously need to jump through a few hoops.
Things like setting ENV{CONTENT-LENGTH} after reassigning $STDIN, and making
sure that you are giving the user their data and not somebody elses.

---
Rodney Broom
Programmer: Desert.Net



Reply via email to