Re: mod_perl2 and document_root

2004-08-17 Thread Stas Bekman
Glenn Strauss wrote: [...] What is/are the problem(s) we're trying to solve here? We can use "mod_userdir_user" to detect that it is a userdir request and that document_root does not apply, even if we can't get the userdir root path. We can't easily do the same for other mappings. Well, actually,

Re: mod_perl2 and document_root

2004-08-17 Thread Glenn Strauss
On Tue, Aug 17, 2004 at 10:09:12PM -0700, Stas Bekman wrote: > >In Apache2, mod_userdir sets a note named "mod_userdir_user" in > >the r->notes table, so there is a way to detect if you are in a > >Userdir request (if using mod_userdir). However, that note only > >tells you the target user, not th

Re: mod_perl2 and document_root

2004-08-17 Thread Stas Bekman
Geoffrey Young wrote: Right. The examples you've found are from mod_perl 1, Apache2 has this in its docs: /** * Retrieve the document root for this server * @param r The current request * @warning Don't use this! If your request went through a Userdir, or * something like that, it'll screw you. B

Re: mod_perl2 and document_root

2004-08-17 Thread Stas Bekman
Glenn Strauss wrote: On Tue, Aug 17, 2004 at 04:45:20PM -0700, Stas Bekman wrote: Right. The examples you've found are from mod_perl 1, Apache2 has this in its docs: /** * Retrieve the document root for this server * @param r The current request * @warning Don't use this! If your request went th

Re: mod_perl2 and document_root

2004-08-17 Thread Glenn Strauss
On Tue, Aug 17, 2004 at 04:45:20PM -0700, Stas Bekman wrote: > Right. The examples you've found are from mod_perl 1, Apache2 has this in > its docs: > > /** > * Retrieve the document root for this server > * @param r The current request > * @warning Don't use this! If your request went throug

Re: mod_perl2 and document_root

2004-08-17 Thread Geoffrey Young
> Right. The examples you've found are from mod_perl 1, Apache2 has this > in its docs: > > /** > * Retrieve the document root for this server > * @param r The current request > * @warning Don't use this! If your request went through a Userdir, or > * something like that, it'll screw you. B

Re: How to tell if there's data waiting on a NON-blocking Apache connection?

2004-08-17 Thread Stas Bekman
Ken Simpson wrote: $c->client_socket gives you the socket object, now I suppose you want to poll() it for read. Unfortunately we haven't exposed APR::Poll yet. Take a look at the C API: http://lxr.webperf.org/source.cgi/srclib/apr/include/apr_poll.h http://docx.webperf.org/apr__poll_8h.html http

Re: How to tell if there's data waiting on a NON-blocking Apache connection?

2004-08-17 Thread Ken Simpson
> $c->client_socket gives you the socket object, now I suppose you want to > poll() it for read. Unfortunately we haven't exposed APR::Poll yet. Take a > look at the C API: > > http://lxr.webperf.org/source.cgi/srclib/apr/include/apr_poll.h > http://docx.webperf.org/apr__poll_8h.html > http://do

Re: write results of subrequest to file

2004-08-17 Thread Stas Bekman
Philippe M. Chiasson wrote: Stas Bekman wrote: Philippe M. Chiasson wrote: Geoffrey Young wrote: Perrin Harkins wrote: On Fri, 2004-08-13 at 11:06, Geoffrey Young wrote: you can't do that with mod_perl 1.0 - you can $sub->run() but that result goes right to the client. For comparison, how wo

Re: How to tell if there's data waiting on a NON-blocking Apache connection?

2004-08-17 Thread Stas Bekman
Ken Simpson wrote: Oops -- the subject line was wrong last time. Let's try again: If all I have is an Apache::Connection object, is there a way to tell whether data is available from the connection's socket in the case where the connection has been put into nonblocking mode. $c->client_socket gives

Re: write results of subrequest to file

2004-08-17 Thread Philippe M. Chiasson
Stas Bekman wrote: Philippe M. Chiasson wrote: Geoffrey Young wrote: Perrin Harkins wrote: On Fri, 2004-08-13 at 11:06, Geoffrey Young wrote: you can't do that with mod_perl 1.0 - you can $sub->run() but that result goes right to the client. For comparison, how would you do this in mp2? With

How to tell if there's data waiting on a NON-blocking Apache connection?

2004-08-17 Thread Ken Simpson
Oops -- the subject line was wrong last time. Let's try again: If all I have is an Apache::Connection object, is there a way to tell whether data is available from the connection's socket in the case where the connection has been put into nonblocking mode. Thanks, Ken -- MailChannels: Control Y

Re: mod_perl2 and document_root

2004-08-17 Thread Stas Bekman
Dave Della Costa wrote: Hey folks, I'm trying to learn how to use mod_perl to change document_root on the fly, but I'm having a lot of difficulty with it. Here's the setup: Apache/2.0.50, mod_perl/1.99_11 Perl/v5.8.4 PHP/4.3.8 Server I'm calling the code this way: PerlTransHandler MyApache::Rewri

Re: How to close a socket when all you have in an Apache::Connection object

2004-08-17 Thread Stas Bekman
Ken Simpson wrote: I'm writing a protocol handler for mod_perl 2.0. If all I have is an Apache::Connection object, how can I tell Apache I want to close the connection? I tried sending an end of stream bucket down the bucket brigade, but that clearly did nothing. What's the canonical solution? Norm

How to close a socket when all you have in an Apache::Connection object

2004-08-17 Thread Ken Simpson
I'm writing a protocol handler for mod_perl 2.0. If all I have is an Apache::Connection object, how can I tell Apache I want to close the connection? I tried sending an end of stream bucket down the bucket brigade, but that clearly did nothing. What's the canonical solution? Regards, Ken -- Ma

Re: write results of subrequest to file

2004-08-17 Thread Stas Bekman
Philippe M. Chiasson wrote: Geoffrey Young wrote: Perrin Harkins wrote: On Fri, 2004-08-13 at 11:06, Geoffrey Young wrote: you can't do that with mod_perl 1.0 - you can $sub->run() but that result goes right to the client. For comparison, how would you do this in mp2? With a filter? pretty mu

Re: write results of subrequest to file

2004-08-17 Thread Philippe M. Chiasson
Geoffrey Young wrote: Perrin Harkins wrote: On Fri, 2004-08-13 at 11:06, Geoffrey Young wrote: you can't do that with mod_perl 1.0 - you can $sub->run() but that result goes right to the client. For comparison, how would you do this in mp2? With a filter? pretty much. I believe that subreques

mod_perl2 and document_root

2004-08-17 Thread Dave Della Costa
Hey folks, I'm trying to learn how to use mod_perl to change document_root on the fly, but I'm having a lot of difficulty with it. Here's the setup: Apache/2.0.50, mod_perl/1.99_11 Perl/v5.8.4 PHP/4.3.8 Server I'm calling the code this way: PerlTransHandler MyApache::RewriteURI ...and this is

ANNOUNCE: Krang RSS 1.00

2004-08-17 Thread Peter Leonard
We're pleased to announce that Krang RSS v1.00 has been released. Krang RSS is a Krang element-library addon that creates RSS files for the purposes of syndication. RSS is designed to be easily integrated into existing Krang element libraries with minimal work. From the documentation: "The RSS