Apache::AuthCookie not set cookie really

2002-01-28 Thread BeerBong

Hello all!

Odd thing - all should works fine.
I use Apache::AuthCookie for my project Agenda.
I wrote descendant - Apache::AuthCookieAgenda

package Apache::AuthCookieAgenda;

use strict;
use Apache;
use Apache::Constants qw(:common);
use Apache::AuthCookie;
use Agenda;

use vars qw($VERSION @ISA);

$VERSION = substr(q$Revision: 1.1 $, 10);
@ISA = qw(Apache::AuthCookie);

sub authen_cred ($$\@) {
my $self = shift;
my $r = shift;
my @creds = @_;

# This would really authenticate the credentials
# and return the session key.
# Here I'm just using setting the session
# key to the credentials and delaying authentication.
#
# Similar to HTTP Basic Authentication, only not base 64 encoded

join(:, @creds);
}

sub authen_ses_key ($$$) {
my $self = shift;
my $r = shift;
my($user, $password) = split(/:/, shift, 2);

my $modeller = Agenda-new();
$r-warn(Auth - $user - $password);

# Authenticate use here...
$modeller-authorize($user, $password) eq OK ? $user : undef;

}

In conf file

   IfDefine power
Perl
 use lib qw(/usr/web/inc /usr/web/dev.webzavod.ru/modules);
 use Apache::Agenda;
 use Apache::AuthCookieAgenda;
/Perl
PerlInitHandler Apache::Reload
PerlSetVar AuthCookieDebug 10

Location  /agenda/
  SetHandler perl-script
  PerlHandler Apache::Agenda

  PerlSetVar AgendaPath /agenda
  PerlSetVar AgendaTemplate default.inc
  PerlSetVar AgendaSessionDir /tmp
  PerlSetVar AgendaLoginScript /agenda/login/

  AuthType Apache::AuthCookieAgenda
  AuthName Agenda
  PerlAuthenHandler Apache::AuthCookieAgenda-authenticate
  PerlAuthzHandler Apache::AuthCookieAgenda-authorize
  require valid-user

/Location
Location /LOGIN/
  AuthType Apache::AuthCookieAgenda
  AuthName Agenda
  SetHandler perl-script
  PerlHandler Apache::AuthCookieAgenda-login
/Location

   /IfDefine

when I'm trying to access /agenda/ files I get login page, but after
submit a form, I return to login page again.
In logs


[Mon Jan 28 12:38:35 2002] [error] credential_0 asdasd
[Mon Jan 28 12:38:35 2002] [error] credential_1 asdasd
[Mon Jan 28 12:38:35 2002] [error] ses_key asdasd:asdasd

OUT Headers goes here

$VAR1 = 'Pragma';
$VAR2 = 'no-cache';
$VAR3 = 'Cache-control';
$VAR4 = 'no-cache';
$VAR5 = 'Location';
$VAR6 = '/agenda/tasks/';

Error OUT Headers goes here

$VAR1 = 'Set-Cookie';
$VAR2 = 'Apache::AuthCookieAgenda_Agenda=asdasd:asdasd';
$VAR3 = 'Pragma';
$VAR4 = 'no-cache';

Redirecting...
and next phase

[Mon Jan 28 12:38:35 2002] [error] auth_type Apache::AuthCookieAgenda
[Mon Jan 28 12:38:35 2002] [error] auth_name Agenda
[Mon Jan 28 12:38:35 2002] [error] ses_key_cookie

Cookie field is empty here - I don't know why...
Cookie is set via error headers, I know that it is correct for
REDIRECT responses...
ses_key_cookie is empty, therefore authen_ses_key not even requested,
redirecting to login form again.

[Mon Jan 28 12:38:35 2002] [error] uri /agenda/tasks/
[Mon Jan 28 12:38:35 2002] [error] auth_type Apache::AuthCookieAgenda
[Mon Jan 28 12:38:35 2002] [warn] Header Dump:
GET /agenda/tasks/ HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/ms
word, */*
Accept-Encoding: gzip, deflate
Accept-Language: ru
Cache-Control: no-cache
Cookie: SESSION_ID=1000_56535df97f6ed52c

I used Apache::Session::Counted, and know that this two modules may
conflict, but when all Apache::Session::Counted staff is commented
result is the same...

Host: warzavod:81
Referer: http://warzavod/agenda/tasks/
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
Q312461)
X-Real-IP: 195.209.67.7

I dont know why cookie is not set.

Is there anywhere comparison table for
Apache::AuthCookie - Apache::AuthTicket
and table for
Apache::Session modules - I use Apache::Session::Counted as the single
not-database solution wich I found for maintaining state with cleanup
feature. Or is there anywhere cleanup example for Apache::Session - I
didn't find... Apache::Session::Lock::File-clean cleans up only lock
files...
Apache::ASP - has a good session state algorithm with cleanup...


Sergey Polyakov   aka BeerBong
Chief of WebZavod http://www.webzavod.ru
Tel. +7 (8462) 43-93-85 | +7 (8462) 43-93-86
mailto:[EMAIL PROTECTED]








Re: UI Regression Testing

2002-01-28 Thread Leon Brocard

David Wheeler sent the following bits through the ether:

 we can't really figure out a way to automate the testing of the UI

Well, on our current project we're using using OpenFrame[1] and the
Template Toolkit to completely seperate application logic from
presentation logic. We have applications which deal with the business
logic and all that the templates do is present the data. This way we
can completely test the application using make test. In fact, here
is some sample output ;-):
Files=4, Tests=205,  4 wallclock secs ( 3.80 cusr +  0.19 csys =  3.99 CPU)

Of course, this doesn't stop us from creating templates that don't
work and thus break the user path (so we have to test that
seperately), but seeing as all the templates do is present information
that is passed to them from the application, this testing gives us
great faith in the application as a whole.

HTH, Leon

[1] http://openframe.fotango.com/
-- 
Leon Brocard.http://www.astray.com/
Nanoware...http://www.nanoware.org/

... Beware of Geeks bearing gifs



AuthSession Manager [was] Apache::AuthCookie not set cookie really

2002-01-28 Thread BeerBong

 Hello all!

 Odd thing - all should works fine.
 I use Apache::AuthCookie for my project Agenda.
 I wrote descendant - Apache::AuthCookieAgenda
 
 package Apache::AuthCookieAgenda;

 use strict;
 use Apache;
 use Apache::Constants qw(:common);
 use Apache::AuthCookie;
 use Agenda;

 use vars qw($VERSION @ISA);

 $VERSION = substr(q$Revision: 1.1 $, 10);
 @ISA = qw(Apache::AuthCookie);

 sub authen_cred ($$\@) {
 my $self = shift;
 my $r = shift;
 my @creds = @_;

 # This would really authenticate the credentials
 # and return the session key.
 # Here I'm just using setting the session
 # key to the credentials and delaying authentication.
 #
 # Similar to HTTP Basic Authentication, only not base 64 encoded

 join(:, @creds);
 }

 sub authen_ses_key ($$$) {
 my $self = shift;
 my $r = shift;
 my($user, $password) = split(/:/, shift, 2);

 my $modeller = Agenda-new();
 $r-warn(Auth - $user - $password);

 # Authenticate use here...
 $modeller-authorize($user, $password) eq OK ? $user : undef;

 }
 
 In conf file
 
IfDefine power
 Perl
  use lib qw(/usr/web/inc /usr/web/dev.webzavod.ru/modules);
  use Apache::Agenda;
  use Apache::AuthCookieAgenda;
 /Perl
 PerlInitHandler Apache::Reload
 PerlSetVar AuthCookieDebug 10

 Location  /agenda/
   SetHandler perl-script
   PerlHandler Apache::Agenda

   PerlSetVar AgendaPath /agenda
   PerlSetVar AgendaTemplate default.inc
   PerlSetVar AgendaSessionDir /tmp
   PerlSetVar AgendaLoginScript /agenda/login/

   AuthType Apache::AuthCookieAgenda
   AuthName Agenda
   PerlAuthenHandler Apache::AuthCookieAgenda-authenticate
   PerlAuthzHandler Apache::AuthCookieAgenda-authorize
   require valid-user

 /Location
 Location /LOGIN/
   AuthType Apache::AuthCookieAgenda
   AuthName Agenda
   SetHandler perl-script
   PerlHandler Apache::AuthCookieAgenda-login
 /Location

/IfDefine
 
 when I'm trying to access /agenda/ files I get login page, but after
 submit a form, I return to login page again.
 In logs
 

 [Mon Jan 28 12:38:35 2002] [error] credential_0 asdasd
 [Mon Jan 28 12:38:35 2002] [error] credential_1 asdasd
 [Mon Jan 28 12:38:35 2002] [error] ses_key asdasd:asdasd

 OUT Headers goes here

 $VAR1 = 'Pragma';
 $VAR2 = 'no-cache';
 $VAR3 = 'Cache-control';
 $VAR4 = 'no-cache';
 $VAR5 = 'Location';
 $VAR6 = '/agenda/tasks/';

 Error OUT Headers goes here

 $VAR1 = 'Set-Cookie';
 $VAR2 = 'Apache::AuthCookieAgenda_Agenda=asdasd:asdasd';
 $VAR3 = 'Pragma';
 $VAR4 = 'no-cache';

 Redirecting...
 and next phase

 [Mon Jan 28 12:38:35 2002] [error] auth_type
Apache::AuthCookieAgenda
 [Mon Jan 28 12:38:35 2002] [error] auth_name Agenda
 [Mon Jan 28 12:38:35 2002] [error] ses_key_cookie

 Cookie field is empty here - I don't know why...
 Cookie is set via error headers, I know that it is correct for
 REDIRECT responses...
 ses_key_cookie is empty, therefore authen_ses_key not even
requested,
 redirecting to login form again.

 [Mon Jan 28 12:38:35 2002] [error] uri /agenda/tasks/
 [Mon Jan 28 12:38:35 2002] [error] auth_type
Apache::AuthCookieAgenda
 [Mon Jan 28 12:38:35 2002] [warn] Header Dump:
 GET /agenda/tasks/ HTTP/1.0
 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
 application/vnd.ms-excel, application/vnd.ms-powerpoint,
 application/ms
 word, */*
 Accept-Encoding: gzip, deflate
 Accept-Language: ru
 Cache-Control: no-cache
 Cookie: SESSION_ID=1000_56535df97f6ed52c

 I used Apache::Session::Counted, and know that this two modules may
 conflict, but when all Apache::Session::Counted staff is commented
 result is the same...

 Host: warzavod:81
 Referer: http://warzavod/agenda/tasks/
 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
 Q312461)
 X-Real-IP: 195.209.67.7

 I dont know why cookie is not set.

 Is there anywhere comparison table for
 Apache::AuthCookie - Apache::AuthTicket
 and table for
 Apache::Session modules - I use Apache::Session::Counted as the
single
 not-database solution wich I found for maintaining state with
cleanup
 feature. Or is there anywhere cleanup example for Apache::Session -
I
 didn't find... Apache::Session::Lock::File-clean cleans up only
lock
 files...
 Apache::ASP - has a good session state algorithm with cleanup...

Ok.
I readed the previous discuss with
http://marc.theaimsgroup.com/?t=10110064594r=1w=2
And ask the question in more general form.

Our team writing project management open source system Agenda.
There is a couple groupware application written on php, I installed
every of them.
All of them cannot be used for
1. Company with greater than 1 department
2. With one or more 

Re: AuthSession Manager [was] Apache::AuthCookie not set cookie really

2002-01-28 Thread Perrin Harkins

 Application's main goals
 1. Simple install.
 I don't want use cron jobs for cleanup - I think, it can be problem
 for some users.

Most of the existing session stuff is written to leave cleanup to you.  If
you don't want to use cron jobs, you can do it in a cleanup handler,
possibly exec'ing a separate script to avoid keeping the heavy mod_perl
process around.

 I need to authorize user and don't want to query on every request is
 you admin, which departments you belong to etc..

Unless you're willing to put real information in the cookie (not just an
ID), you have to do some kind of lookup on the server-side for every request
if they need session information.  It may not be to a database though.  If
you know that each user will stay on a single server, you can use a
disk-based technique like Cache::FileCache or Apache::Session::File.

 Apache::AuthCookie doesn't want to set cookie on redirect (see above).

There's a lot of stuff in the archives about cookies and redirects.  Maybe
that will help.  You're not the first person to have problems with this.

 I don't think that it is good to use the Oracle database for
 maintaining state or secrets for tickets. It can be slower than query
 indexed table even on every request for password and departments where
 user works.

It's generally fast enough, since it's a single row retrieved by ID.  MySQL
is very fast at this kind of thing though.

- Perrin




Re: Apache::args vs Apache::Request speed

2002-01-28 Thread Stas Bekman

Joe Schaefer wrote:

 Stas Bekman [EMAIL PROTECTED] writes:
 
 
Well, I've run the benchmark and it wasn't the case. Did it change 
recently? Or do you think that the benchmark is not fair?

we are talking about this item
http://perl.apache.org/guide/performance.html#Apache_args_vs_Apache_Request

 
 Right- param() was rewritten as XS about 6-8 months ago; since then
 I've benchmarked it a few times and found param() to be a bit faster than
 args().  We'll be releasing a 1.0 version of libapreq as soon as Jim 
 approves of the current CVS version.  Here's what I got using it on 
 your benchmark (some differences: the tests were run against localhost 
 running perl 5.00503 + mod_perl 1.26 + apache 1.3.22 and using Perl 
 handlers instead of Apache::RegistryLoader scripts):


Great! Now we have an even broader benchmark. Please tell me when 1.0 is 
released (in case I get carried away with other things and don't notice 
the announce) and I'll make sure to update my benchmarking package, 
re-run the benchmarks and correct the results in the guide.

Thanks Joe!


_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




Re: Apache::args vs Apache::Request speed

2002-01-28 Thread Joe Schaefer

Stas Bekman [EMAIL PROTECTED] writes:

 Great! Now we have an even broader benchmark. Please tell me when 1.0 is 
 released (in case I get carried away with other things and don't notice 
 the announce) and I'll make sure to update my benchmarking package, 
 re-run the benchmarks and correct the results in the guide.

Great- there's a typo or two in the handler_do sub, but they should be 
pretty obvious when you try to run it.

I hope a new release will be just around the corner, but if you want
to test out some of the latest stuff, have a look at

  http://www.apache.org/~joes/

I don't think we'll have a 1.0 that works on OS/X, but I might be able
to include a patch in the distro that will build the C api of libapreq 
directly into httpd.  This might allow OS/X to run Apache::Request and
Apache::Cookie at the same time, but that platform is unavailable to me
for testing.

-- 
Joe Schaefer




Re: help: LWP::Simple within a mod_perl context

2002-01-28 Thread darren chamberlain

Matthew Kennedy [EMAIL PROTECTED] said something to this effect on 
01/28/2002:
 Hello, I am using LWP::Simple within a mod_perl context to
 retrieve content from an external site within a request to our
 site. I've installed LWP::Simple correctly, however is doesn't
 work within mod_perl and (I suspect) it doesn't work work
 within a regular CGI app.
 
 I wrote a simple script and ran it su - apache -c
 '/path/to/script' and it doesn't return any content. It does
 return content for real user id's though (eg. su - mkennedy
 ...). So I suspect the apache user cannot use LWP::Simple
 because LWP::Simple is requiring some rights user apache does
 not have.

Have you tried running this as the apache user:

$ /path/to/perl -MLWP::Simple -le 'getprint http://my.url/to/get;'

This will tell you if the problem is with LWP::Simple or
something else.

Next, do a little ls -l `perldoc -l LWP::Simple` and make sure
that the permissions are right.

(darren)

-- 
Whatever is done for love is beyond good and evil.
-- Friedrich Neitzsche



AxKit Segfaults

2002-01-28 Thread Aaron E. Ross


 Hi all,

  I was excited about AxKit. :(

  I'm getting segfaults on the first request, but have neither expat
  (strings shows now symbols in httpd, mod_perl built with DO_HTTPD=1),
  nor php installed.

  Any other ideas?  I'm building with debug flags now.

  apache-1.3.22
  mod_perl-1.26
  perl-5.6.1

  Thanks, Aaron

-- 
aaron ross . alias i, inc
 email . [EMAIL PROTECTED]
 phone . 215 545 6428



Re: AxKit Segfaults

2002-01-28 Thread Robin Berjon

On Monday 28 January 2002 21:05, Aaron E. Ross wrote:
   I was excited about AxKit. :(

For good reason :)

   I'm getting segfaults on the first request, but have neither expat
   (strings shows now symbols in httpd, mod_perl built with DO_HTTPD=1),
   nor php installed.

   Any other ideas?  I'm building with debug flags now.

   apache-1.3.22
   mod_perl-1.26
   perl-5.6.1

The AxKit version, XML::LibXML version, what you're trying to get it to do, 
output from your error log with AxDebugLevel 10 set, and output from 
installation (eg missing modules and the such) could help.

AxKit also has it's own mailing list, [EMAIL PROTECTED] where lots of 
froody axkit people try to help one another ;-)

-- 
___
Robin Berjon [EMAIL PROTECTED] -- CTO
k n o w s c a p e : // venture knowledge agency www.knowscape.com
---
Humans are destined to be party animals, and the technology will 
follow. 
-- Linus Torvalds




changing system password though apache with modperl

2002-01-28 Thread Angèle Jankok-Mercera



Hi,
I am not a perl programmer and just standing 
at the front door I quess.
I am looking for a perl code which I can use 
to
modify a user's system password through 
a
web page. 
thank you.

Angele



extremeperl@yahoogroups.com

2002-01-28 Thread Rob Nagler

It seems there are a number of people interested in Extreme
Programming in Perl, so there's yaml at:

http://groups.yahoo.com/group/extremeperl/

Cheers,
Rob



Cache::FileCache issues

2002-01-28 Thread Christian Gilmore

Hi. I'm trying to update Apache::AuthenCache and Apache::AuthzCache to use
Cache::Cache instead of IPC::Cache. The cutover should be straightforward
enough, but I am finding a roadblock. I'm hoping someone can point out
something obvious I'm overlooking. Here is the relevant hunk of code and
output from the debug-set apache.

my $cache = Cache::FileCache-new({ namespace  = $auth_name,
default_expires_in =
$cache_time_limit,
cache_root = $cache_dir,
directory_umask= $cache_umask });


[Mon Jan 28 14:52:35 2002] [debug]
/opt/gnu/depot/perl-5.6.1/lib/site_perl/5.6.1
/Apache/AuthenCache.pm(178): [client 1.16.67.28] manage_cache:
cache_time_limit=
30, cache_dir=/tmp, cache_umask=007, auth_name=Enterprise Server
[Mon Jan 28 14:52:35 2002] [error] mkdir : No such file or directory at
/opt/gnu
/depot/perl-5.6.1/lib/site_perl/5.6.1/Cache/FileBackend.pm line 220

I'm trying to use the default /tmp (I have also tried a non-default), but
I get a burp from within Cache::FileCache's library. Ideas?

Regards,
Christian

-
Christian Gilmore
Team Lead
Web Infrastructure  Tools
IBM Software Group




is there something wrong with my http header?

2002-01-28 Thread Alex Porras

I'm trying to print a gif image to the browser, but it's appearing as
text.  Here's what the output looks like (used lynx --mime_header):

HTTP/1.1 200 OK
Date: Mon, 28 Jan 2002 21:58:05 GMT
Server: Apache/1.3.20 (Unix) mod_perl/1.26
Set-Cookie: FOO=bar; domain=foo.bar; path=/
Pragma: no-cache
Cache-control: no-cache
Connection: close
Content-Type: image/gif
Expires: Mon, 28 Jan 2002 21:58:05 GMT

R0lGODdhOAAWAPcAVQAAqgAA/wAkAAAkVQAkqgAk/wBJAABJVQBJqgBJ/wBtAABt
VQBt
...(more data)...


My script does the following:

$r-no_cache( 1 );
$r-content_type('image/gif');
$r-send_http_header;
$r-print( $data );
$r-exit(OK);

Any thoughts?

TIA,

--Alex



Dynamically serving an .htaccess file with mod_perl

2002-01-28 Thread Michael A Nachbaur

Hello all,

Does anyone know of a way that I can server the contents of an .htaccess
file dynamically?  I know Apache checks the request directory (and all
directories above it) for an .htaccess file before serving a file request,
but there is no mention of how it goes about loading that file.

thanks.

-man




Re: is there something wrong with my http header?

2002-01-28 Thread Robert Landrum

I'm trying to print a gif image to the browser, but it's appearing as
text.  Here's what the output looks like (used lynx --mime_header):

HTTP/1.1 200 OK
Date: Mon, 28 Jan 2002 21:58:05 GMT
Server: Apache/1.3.20 (Unix) mod_perl/1.26
Set-Cookie: FOO=bar; domain=foo.bar; path=/
Pragma: no-cache
Cache-control: no-cache
Connection: close
Content-Type: image/gif
Expires: Mon, 28 Jan 2002 21:58:05 GMT

R0lGODdhOAAWAPcAVQAAqgAA/wAkAAAkVQAkqgAk/wBJAABJVQBJqgBJ/wBtAABt
VQBt
...(more data)...


Uhh... That's not gif data.  gif data should start

GIF89a...(more data)...

Rob


--
When I used a Mac, they laughed because I had no command prompt. When 
I used Linux, they laughed because I had no GUI.  



RE: is there something wrong with my http header?

2002-01-28 Thread Alex Porras

I'm a goof.  That data is from an imap server--I forgot to decode it
first.

Thanks,

--Alex

 -Original Message-
 From: Robert Landrum [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 28, 2002 4:16 PM
 To: [EMAIL PROTECTED]
 Subject: Re: is there something wrong with my http header?
 
 
 I'm trying to print a gif image to the browser, but it's appearing as
 text.  Here's what the output looks like (used lynx --mime_header):
 
 HTTP/1.1 200 OK
 Date: Mon, 28 Jan 2002 21:58:05 GMT
 Server: Apache/1.3.20 (Unix) mod_perl/1.26
 Set-Cookie: FOO=bar; domain=foo.bar; path=/
 Pragma: no-cache
 Cache-control: no-cache
 Connection: close
 Content-Type: image/gif
 Expires: Mon, 28 Jan 2002 21:58:05 GMT
 
 R0lGODdhOAAWAPcAVQAAqgAA/wAkAAAkVQAkqgAk/wBJAABJVQBJq
 gBJ/wBtAABt
 VQBt
 ...(more data)...
 
 
 Uhh... That's not gif data.  gif data should start
 
 GIF89a...(more data)...
 
 Rob
 
 
 --
 When I used a Mac, they laughed because I had no command prompt. When 
 I used Linux, they laughed because I had no GUI.  
 



Re: Cache::FileCache issues

2002-01-28 Thread Perrin Harkins

 [Mon Jan 28 14:52:35 2002] [error] mkdir : No such file or directory at
 /opt/gnu
 /depot/perl-5.6.1/lib/site_perl/5.6.1/Cache/FileBackend.pm line 220

Looks to me like your system has no mkdir command, or it isn't in the path,
or it doesn't support an option that's needed (-p maybe?).

Maybe Cache::FileBackend should use File::Path::mkpath for portability.

- Perrin




ANNOUNCE: HTTP::TestEngine v0.02

2002-01-28 Thread Chris Brooks

Good morning,

I have released version 0.02 of HTTP::TestEngine to sourceforge.
TestEngine acts as an http session recorder.  After setting a cookie,
a user can record a session by simply clicking links in their browser:
filenames, paths and parameters are written to the filesystem for recall
in the future.  Session data is stored in test harness-independent
format, and a second module, HTTP::SessionConfig is responsible for
converting the session data into a data structure that is appropriate
for play-back.  HTTP::Monkeywrench is currently supported, with plans
for HTTP::WebTest support in the future.

I would appreciate any feedback and suggestions that people have.  You
can download the latest version at
http://sourceforge.net/projects/http-recorder/

Thanks,
Chris
--

Chris Brooks
Director of Technology
CareScout.com
phone: (781) 431-7033 x 342





Re: Dynamically serving an .htaccess file with mod_perl

2002-01-28 Thread Matt Sergeant

On Mon, 28 Jan 2002, Michael A Nachbaur wrote:

 Hello all,

 Does anyone know of a way that I can server the contents of an .htaccess
 file dynamically?  I know Apache checks the request directory (and all
 directories above it) for an .htaccess file before serving a file request,
 but there is no mention of how it goes about loading that file.

Not that I know of, but you can hook in there custom parsing code. It's
way too complex to explain though, so I suggest you get the eagle book
which goes into details on it.

-- 
!-- Matt --
:-Get a smart net/:-




cvs commit: modperl-2.0/xs/tables/current/Apache FunctionTable.pm StructureTable.pm

2002-01-28 Thread dougm

dougm   02/01/28 21:35:34

  Modified:xs/tables/current/Apache FunctionTable.pm StructureTable.pm
  Log:
  sync
  
  Revision  ChangesPath
  1.32  +146 -59   modperl-2.0/xs/tables/current/Apache/FunctionTable.pm
  
  Index: FunctionTable.pm
  ===
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/Apache/FunctionTable.pm,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- FunctionTable.pm  25 Jan 2002 04:04:12 -  1.31
  +++ FunctionTable.pm  29 Jan 2002 05:35:34 -  1.32
  @@ -2,7 +2,7 @@
   
   # !!
   # ! WARNING: generated by Apache::ParseSource/0.02
  -# !  Thu Jan 24 19:50:33 2002
  +# !  Mon Jan 28 20:30:40 2002
   # !  do NOT edit, any changes will be lost !
   # !!
   
  @@ -28,6 +28,20 @@
   ]
 },
 {
  +'return_type' = 'void',
  +'name' = 'ap_add_file_conf',
  +'args' = [
  +  {
  +'type' = 'core_dir_config *',
  +'name' = 'conf'
  +  },
  +  {
  +'type' = 'void *',
  +'name' = 'url_config'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'ap_filter_t *',
   'name' = 'ap_add_input_filter',
   'args' = [
  @@ -50,6 +64,28 @@
   ]
 },
 {
  +'return_type' = 'ap_filter_t *',
  +'name' = 'ap_add_input_filter_handle',
  +'args' = [
  +  {
  +'type' = 'ap_filter_rec_t *',
  +'name' = 'f'
  +  },
  +  {
  +'type' = 'void *',
  +'name' = 'ctx'
  +  },
  +  {
  +'type' = 'request_rec *',
  +'name' = 'r'
  +  },
  +  {
  +'type' = 'conn_rec *',
  +'name' = 'c'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'void',
   'name' = 'ap_add_loaded_module',
   'args' = [
  @@ -136,6 +172,56 @@
   ]
 },
 {
  +'return_type' = 'ap_filter_t *',
  +'name' = 'ap_add_output_filter_handle',
  +'args' = [
  +  {
  +'type' = 'ap_filter_rec_t *',
  +'name' = 'f'
  +  },
  +  {
  +'type' = 'void *',
  +'name' = 'ctx'
  +  },
  +  {
  +'type' = 'request_rec *',
  +'name' = 'r'
  +  },
  +  {
  +'type' = 'conn_rec *',
  +'name' = 'c'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'void',
  +'name' = 'ap_add_per_dir_conf',
  +'args' = [
  +  {
  +'type' = 'server_rec *',
  +'name' = 's'
  +  },
  +  {
  +'type' = 'void *',
  +'name' = 'dir_config'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'void',
  +'name' = 'ap_add_per_url_conf',
  +'args' = [
  +  {
  +'type' = 'server_rec *',
  +'name' = 's'
  +  },
  +  {
  +'type' = 'void *',
  +'name' = 'url_config'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'void',
   'name' = 'ap_add_version_component',
   'args' = [
  @@ -581,7 +667,7 @@
   ]
 },
 {
  -'return_type' = 'void',
  +'return_type' = 'int',
   'name' = 'ap_create_scoreboard',
   'args' = [
 {
  @@ -1513,28 +1599,6 @@
 },
 {
   'return_type' = 'void',
  -'name' = 'ap_hook_create_connection',
  -'args' = [
  -  {
  -'type' = 'ap_HOOK_create_connection_t *',
  -'name' = 'pf'
  -  },
  -  {
  -'type' = 'const char * const *',
  -'name' = 'aszPre'
  -  },
  -  {
  -'type' = 'const char * const *',
  -'name' = 'aszSucc'
  -  },
  -  {
  -'type' = 'int',
  -'name' = 'nOrder'
  -  }
  -]
  -  },
  -  {
  -'return_type' = 'void',
   'name' = 'ap_hook_create_request',
   'args' = [
 {
  @@ -1643,11 +1707,6 @@
 },
 {
   'return_type' = 'apr_array_header_t *',
  -'name' = 'ap_hook_get_create_connection',
  -'args' = []
  -  },
  -  {
  -'return_type' = 'apr_array_header_t *',
   'name' = 'ap_hook_get_create_request',
   'args' = []
 },
  @@ -2400,6 +2459,24 @@
   ]
 },
 {
  +'return_type' = 'const char *',
  +'name' = 'ap_limit_section',
  +'args' = [
  +  {
  +'type' = 'cmd_parms *',
  +'name' = 'cmd'
  +  },
  +  {
  +'type' = 'void *',
  +'name' = 'dummy'
  +  },
  +  {
  +'type' = 'const char *',
  +'name' = 'arg'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'void',
   'name' = 'ap_lingering_close',
   'args' = [
  @@ -3912,32 +3989,6 @@
   ]
 },
 {
  -'return_type' = 'conn_rec *',
  -'name' = 'ap_run_create_connection',
  -'args' = [
  -  {
  -'type' = 'apr_pool_t *',
  -'name' = 'p'
  -  },
  -  {
  -'type' = 'server_rec *',
  -  

cvs commit: modperl-2.0/todo api.txt

2002-01-28 Thread stas

stas02/01/28 21:41:59

  Modified:todo api.txt
  Log:
  - no need to implement the interface for apr_array_header as there is no
  use for it in mod_perl
  
  Revision  ChangesPath
  1.20  +0 -3  modperl-2.0/todo/api.txt
  
  Index: api.txt
  ===
  RCS file: /home/cvs/modperl-2.0/todo/api.txt,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- api.txt   23 Dec 2001 04:30:28 -  1.19
  +++ api.txt   29 Jan 2002 05:41:59 -  1.20
  @@ -102,9 +102,6 @@
   Apache-unescape_url{_info}:
   not yet implemented.  should be moved to Apache::Util
   
  -apr_array_header_t:
  -needs an interface, either methods and/or tied array interface
  -
   Apache::perl_hook:
   should have this or something check if PerlOptions allows the given
   handler/feature to be used.
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_util.c

2002-01-28 Thread stas

stas02/01/28 21:52:24

  Modified:src/modules/perl modperl_util.c
  Log:
  if undef is passed try to get the pool from the current request
  
  Revision  ChangesPath
  1.35  +12 -0 modperl-2.0/src/modules/perl/modperl_util.c
  
  Index: modperl_util.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- modperl_util.c29 Jan 2002 04:49:37 -  1.34
  +++ modperl_util.c29 Jan 2002 05:52:24 -  1.35
  @@ -174,6 +174,18 @@
   char *classname = NULL;
   IV ptr = 0;
   
  +/* get the pool from the current request if applicable */
  +if (obj == PL_sv_undef) {
  +request_rec *r = NULL;
  +(void)modperl_tls_get_request_rec(r);
  +
  +if (r) {
  +return r-pool;
  +}
  +
  +return NULL;
  +}
  +
   if ((SvROK(obj)  (SvTYPE(SvRV(obj)) == SVt_PVMG))) {
   ptr = SvObjIV(obj);
   classname = SvCLASS(obj);