ANANNOUNCE: Apache-AuthenCache-0.05

2001-08-18 Thread Jason Bodnar

NAME
   Apache::AuthenCache - Authentication caching used in
   conjuction with a primary authentication module
   (Apache::AuthenDBI, Apache::AuthenLDAP, etc.)

CHANGES

0.05  Thu Aug 16 17:00:00 2001
- Patch from Christian Gilmore fixing bug caused by 
  missing 'use Apache::Log' and removing check for mod_perl 1.26
- Added per-realm caching back in as implemented in 0.03 and 
  missed in the 0.04 rewrite 
  A different cache is created for each realm (AuthName) so 
  users allowed access to one realm do not get access to other realms.



-FW: <[EMAIL PROTECTED]>-

Date: Sun, 19 Aug 2001 02:32:16 +0200
From: PAUSE <[EMAIL PROTECTED]>
To: Jason Bodnar <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: CPAN Upload: J/JB/JBODNAR/Apache-AuthenCache-0.05.tar.gz

The uploaded file

Apache-AuthenCache-0.05.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/J/JB/JBODNAR/Apache-AuthenCache-0.05.tar.gz
  size: 4686 bytes
   md5: d6d19a1dca46ad03c7504fbc8d435fca

No action is required on your part
Request entered by: JBODNAR (Jason Bodnar)
Request entered on: Sun, 19 Aug 2001 00:31:53 GMT
Request completed:  Sun, 19 Aug 2001 00:32:16 GMT

Virtually Yours,
Id: paused,v 1.74 2001/05/20 14:59:52 k Exp k 

--End of forwarded message-

-- 
Jason Bodnar
[EMAIL PROTECTED]



Why do RaQ4is run mod_perl so slowly?

2001-08-18 Thread Philip Mak

I have a RaQ4i server (450MHz AMD K-6 processor). If I have 20 mod_perl
httpd processes running concurrently, then the system's load average goes
up over 10.0 and CPU usage is 100%. The machine has RAM to spare, so
swapping is not the problem.

Is that the norm for a 450MHz server, or is there something I can do to
make it work better?





Patch for Apache::DumpHeaders

2001-08-18 Thread Tatsuhiko Miyagawa

Hi Ask,

here is a patch for Apache::ProxyPassThru (in Apache::DumpHeaders),
which fixes the folowing:

* It hangs with POST request
* Links are broken when 302 redirect happens
  LWP::UserAgent::request() automatically handles Redirection.

Thanks.

--- ProxyPassThru.pm~   Sun Aug 19 06:03:43 2001
+++ ProxyPassThru.pmSun Aug 19 06:04:40 2001
@@ -24,11 +24,15 @@
$request->header($key,$val);
 }

-my $res = (new LWP::UserAgent)->request($request);
+if ($r->method eq 'POST') {
+   $request->content(scalar $r->content);
+}
+
+my $res = (new LWP::UserAgent)->simple_request($request);
 $r->content_type($res->header('Content-type'));
 #feed reponse back into our request_rec*
 $r->status($res->code);
-$r->status_line(join " ", $res->code, $res->message);
+$r->status_line($res->status_line);
 $res->scan(sub {
$r->header_out(@_);
 });


--
Tatsuhiko Miyagawa <[EMAIL PROTECTED]>




RE: $r->handler() Issue

2001-08-18 Thread David Wheeler

On Sat, 18 Aug 2001, Geoffrey Young wrote:

> just return DONE - the request will go straight to the logging phase.

Well, that would be good if I didn't want *anything* to be served, but I
do - I just want Apache's default handler to handle it, instead.

But it turns out I was able to figure out the solution: I had to wait
until after the URI Translation phase to do this -- or else that phase
undid whatever I had done! So I added

   $r->handler('default-handler');

to the FixupHandler, and it works great!

Thanks!

David

-- 
David Wheeler AIM: dwTheory
[EMAIL PROTECTED] ICQ: 15726394
   Yahoo!: dew7e
   Jabber: [EMAIL PROTECTED]




Re: Log Phase

2001-08-18 Thread David Wheeler

On Sat, 18 Aug 2001, Perrin Harkins wrote:

> > Is there any way to get the content handling phase to send the content to
> > the client before the logging phase executes?
> 
> Just use a cleanup handler instead of a log handler.

Thank you, Perrrin! That was *exactly* what I needed to know! And it works
great!

Best,

David

-- 
David Wheeler AIM: dwTheory
[EMAIL PROTECTED] ICQ: 15726394
   Yahoo!: dew7e
   Jabber: [EMAIL PROTECTED]




Using CGI.pm in handlers

2001-08-18 Thread Joachim Zobel


Hi.

I have a handler that needs to use CGI.pm to set a cookie. It seems to work 
correctly, but it fills my error log with "(offline mode: enter name=value 
pairs on standard input)" messages. I am doing

use Apache;
require Apache::Constants;
use CGI;
  ...

package SetCookie;

(with $CGI::VERSION='2.46'; mod_perl/1.21)

so I wonder why CGI.pm does not know it is run under mod_perl.

Any Hints appreciated.
Thanx,
Joachim
--
"... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden
koennen."- Bertolt Brecht - Leben des Galilei




RE: $r->handler() Issue

2001-08-18 Thread Geoffrey Young



> -Original Message-
> From: David Wheeler [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, August 18, 2001 2:25 PM
> To: [EMAIL PROTECTED]
> Subject: $r->handler() Issue
> 
> 
> Hey All,
> 
> I've got a PerlTransHandler where I want to disable, under certain
> circumstances (that is, whenever the content type isn't 
> 'text/html') the
> content handler. However, this code doesn't do the trick:

just return DONE - the request will go straight to the logging phase.

HTH

--Geoff 



Re: Log Phase

2001-08-18 Thread Perrin Harkins

> Is there any way to get the content handling phase to send the content to
> the client before the logging phase executes?

Just use a cleanup handler instead of a log handler.
- Perrin




Re: Log Phase

2001-08-18 Thread Philip Mak

On Sat, 18 Aug 2001, David Wheeler wrote:

> I thought that the content would be returned to the browser before the
> logging phase was executed.

I think it makes the logging phase go first, so that it has the
opportunity to check identd on the browser.

> Is there any way to get the content handling phase to send the content to
> the client before the logging phase executes?

I'm not familiar with how handlers work, so I'll let someone else answer
the exact question that you asked.

If you're logging to a MySQL database and that's slowing you down, you
could try using "INSERT DELAYED" instead of "INSERT"; in that case, it
will let you go earlier.

You could also make a "middleman" logging process that starts up when
Apache starts up; when the log handler has something to send, it
communicates with the logging process via a UNIX domain socket, and then
the logging process is the one that puts up with the logging delay. This
is probably better for efficiency reasons (unless you have RAM to spare),
because you don't want to be tying up memory heavy mod_perl processes for
a menial task such as logging.




$r->handler() Issue

2001-08-18 Thread David Wheeler

Hey All,

I've got a PerlTransHandler where I want to disable, under certain
circumstances (that is, whenever the content type isn't 'text/html') the
content handler. However, this code doesn't do the trick:

$r->handler('default-handler');

And neither does this:

$r->handler("perl-script");
$r->set_handlers('PerlHandler' => [ \&OK ])

Or even this:

$r->handler("perl-script");
$r->set_handlers('PerlHandler' => [ \&DECLINED ])

None of these snippets affects the content phase in any way; the
PerlHandler I install in httpd.conf gets executed every time, no matter
what. Can anyone tell me how I can disable my PerlHandler for the current
request?

Thanks,

David

-- 
David Wheeler AIM: dwTheory
[EMAIL PROTECTED] ICQ: 15726394
   Yahoo!: dew7e
   Jabber: [EMAIL PROTECTED]




Log Phase

2001-08-18 Thread David Wheeler

Hi All,

I've got a quick question about the Apache Loggin phase. I've installed a
PerlLogHandler to do some event logging and send alerts once the content
handling phase is finished. I separated these two actions not only because
it makes sense programmatically, but also because I thought that the
content would be returned to the browser before the logging phase was
executed. I seem to have been wrong in this latter assumption, however. If
it takes a while for the log handler to finish its work, the browser sits
and waits for the content.

Is there any way to get the content handling phase to send the content to
the client before the logging phase executes?

TIA!

David

-- 
David Wheeler AIM: dwTheory
[EMAIL PROTECTED] ICQ: 15726394
   Yahoo!: dew7e
   Jabber: [EMAIL PROTECTED]




the config is insisting on 5.00 - which I don't have ?

2001-08-18 Thread Robert

I have 5.6.0 and 5.6.1 Perl installed - but no 5.00503.
How do I stop the config from insisting on it? and trying to find it when I
then config Apache?
. from the error in the Apache configure.

/usr/home/robert/src/mod_perl-1.26//perl/perl2exe/perl5/lib/5.00503/i386-fre
ebsd/auto/DynaLoader/DynaLoader.a

Thanks
robert




Re: How do I really get the URI requested by the browser?

2001-08-18 Thread Remco Schaar

On Sat, 18 Aug 2001, Joachim Zobel wrote:

> Hi.

Hi,

> I want to get the URI requested by the browser just as $REQUST_URI gives it 
> to me inside a content handler. This is needed in other handlers, so I can 
> not use %ENV. I am also not shure, when subprocess_env is initialized.
> 
> Unfortunaltely $r->uri() does not return the URI requested by the browser 
> if I do a sequence of rewrites and subrequests as I do, so I can not use it.
> 
> So how do I get it?

Perhaps the

   $r->the_request
   The request line sent by the client, handy for
   logging, etc.

can be usefull, but you might have to parse a little bit to retrieve only
the uri...

> Thanx,
> Joachim
> --
> "... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden
> koennen."- Bertolt Brecht - Leben des Galilei
> 

bye,
remco