How will I know when I'm ready for mod_perl?

2007-11-27 Thread CraigT
Hello, I've developed an application that just come up under the PerlRun handler. I have no Apache errors. I'm have strict everywhere, no global variables, and all subroutines are stand-alone objects with well defined interfaces in and out. I have code in a startup.pl file executed by the

Hook Ordering

2007-11-27 Thread David Eisner
We have a section of our website that is protected by Basic username/password authentication. I've been asked to setup a system where, once successfully authenticated, users are taken to a legal agreement page which they are asked to accept before they can continue to the page they requested. I'm

Re: Hook Ordering

2007-11-27 Thread Geoffrey Young
David Eisner wrote: > We have a section of our website that is protected by Basic > username/password authentication. I've been asked to setup a system > where, once successfully authenticated, users are taken to a legal > agreement page which they are asked to accept before they can continue >

Re: Hook Ordering

2007-11-27 Thread Issac Goldstand
Access handler always comes *before* authentication/authorization. Maybe add the legal agreement as part of the authorization handler or as a Fixup handler? See http://perl.apache.org/docs/2.0/user/handlers/http.html#HTTP_Request_Cycle_Phases Issac David Eisner wrote: > We have a section of ou

Re: Hook Ordering

2007-11-27 Thread David Eisner
On Nov 27, 2007 10:01 AM, Geoffrey Young <[EMAIL PROTECTED]> wrote: > David Eisner wrote: > > desired behavior is that the user first gets the Basic AuthType > > username/password dialog, and if they successfully login, then they > > get taken to the agreement page. > > use a PerlAuthzHandler inste

Re: How will I know when I'm ready for mod_perl?

2007-11-27 Thread Perrin Harkins
On Nov 27, 2007 9:41 AM, CraigT <[EMAIL PROTECTED]> wrote: > I'm have strict everywhere, no global variables, and all subroutines are > stand-alone objects with well defined interfaces in and out. I have code > in a startup.pl file executed by the HTTPD process that defines the mod_perl > handler

Re: GATEWAY_INTERFACE CGI-Perl

2007-11-27 Thread Perrin Harkins
On Nov 26, 2007 4:14 PM, Neil Shephard <[EMAIL PROTECTED]> wrote: > So it appears to me that apache "doesn't like" the regular expression. Has > anyone else experienced this problem? Is it a bug that needs reporting? If Apache didn't like them, it would refuse to start. You probably just have e

Re: Auth Question need some input

2007-11-27 Thread Perrin Harkins
On Nov 26, 2007 6:12 PM, Alexander Burrows <[EMAIL PROTECTED]> wrote: > Alright I have been sitting on the side lines of learning anything new about > mod_perl for too long. So I hope I've come to the right place to get brushed > up on things. You have. Welcome! I don't write a lot of auth handl

REST

2007-11-27 Thread Beginner
Hi, I hope this isn't a dumb question. I want to try and create a small REST style installation and was considering how to overcome the problem of urls in the form http://www.myfactory.com/parts/1234 The resource after /parts could in theory be any number but you would not want to have a fo

Re: REST

2007-11-27 Thread Michael Peters
Beginner wrote: > The resource after /parts could in theory be any number but you would > not want to have a for each part that existed. Rather > you'd want the handler responsible for /parts to check your db and > return either content or 400. > > On the face of it this is the sort of thing

RE: REST

2007-11-27 Thread Dami Laurent (PJ)
>-Message d'origine- >De : Beginner [mailto:[EMAIL PROTECTED] >Envoyé : mardi, 27. novembre 2007 18:49 >À : modperl@perl.apache.org >Objet : REST > >Hi, > >I hope this isn't a dumb question. > >I want to try and create a small REST style installation and was >considering how to overco

Re: REST

2007-11-27 Thread Issac Goldstand
Excellent question, and very easily doable. You want to look at the PerlTransHandler http://perl.apache.org/docs/2.0/user/handlers/http.html#PerlTransHandler Issac Beginner wrote: > Hi, > > I hope this isn't a dumb question. > > I want to try and create a small REST style installation and

Re: REST

2007-11-27 Thread Perrin Harkins
On Nov 27, 2007 1:04 PM, Dami Laurent (PJ) <[EMAIL PROTECTED]> wrote: > But if you don't need that complexity, you can easily do it in mod_perl : > configure Apache with something like > > SetHandler modperl > PerlResponseHandler My::Parts::Handler > > > and then have your module My::

Re: REST

2007-11-27 Thread David Nicol
> Beginner wrote: > > http://www.myfactory.com/parts/1234 > > > > The resource after /parts could in theory be any number but you would > > not want to have a for each part that existed. Rather > > you'd want the handler responsible for /parts to check your db and > > return either content or 400

RE: REST

2007-11-27 Thread Adam Prime x443
you can also just to do: SetHandler modperl PerlResponseHandler My::Parts::Handler And handle the validation of the rest of the URL within your ResponseHandler. You could implement as much depth below /parts as you want. api calls you'll probably want to use are $r->location

Re: REST

2007-11-27 Thread Torsten Foertsch
On Tue 27 Nov 2007, David Nicol wrote: > $ENV{PATH_INFO} is available in mod_perl is it not? Do not rely in path_info. It is computed in map_to_storage as the remaining part of the uri after the path on disk runs out. So if /parts exists on disk path_info is /number. Otherwise it is /parts/numbe

Re: Auth Question need some input

2007-11-27 Thread Alexander Burrows
Thanks Perrin for the reply. I have seen some mods out there that sound like they will do what I want but as of yet I have not found any god examples of them. I'm one of those people who really needs to see a working practical use of the application as the perldocs tend to be a bit ambiguous to m

Re: Auth Question need some input

2007-11-27 Thread Geoffrey Young
Alexander Burrows wrote: ... > I gave this a shot with the little bits I could find on > the net and I can not seem to get it working. I have ordered the mod_perl > cookbook but have not received it yet. http://www.modperlcookbook.org/chapters/ch13.pdf > > I just tried a very basic one to st

Re: Auth Question need some input

2007-11-27 Thread Perrin Harkins
On Nov 27, 2007 9:32 PM, Alexander Burrows <[EMAIL PROTECTED]> wrote: > Also what is HMAC? http://en.wikipedia.org/wiki/Hmac - Perrin