RE: any way to get the uri path part that matches $r->location?

2014-06-23 Thread Mark Hedges
I was thinking about this, I think I can do something like: my $loc = $r->location; $loc =~ s{/$}{}; my ($loc_match, $rest_of_path) = $r->uri =~ m{^(\Q$loc\E.*?/)(.*?)$}mxs; I will try it out when I get a chance. Mark -Original Message- From: Mark Hedges Sent: Monday, June 23, 2

any way to get the uri path part that matches $r->location?

2014-06-23 Thread Mark Hedges
In Apache2::Controller the dispatch mechanism gets the URI into a variable, then removes $r->location from the start of it to get the remaining parts of the path, to determine which controller method to invoke. This works for conf but not , because $r->location reports the string fr

Re: How to reference %Location outside of ...?

2011-03-01 Thread E R
On Mon, Feb 28, 2011 at 4:41 PM, Jeff Nokes wrote: > I've seen it done where you can make a home-grown module that has a second > package declaration for Apache[2]::ReadConfig.  Something like ... Thanks, I've found that this works: use Some::Module; Some::Module::init(__PACKAGE__); packa

Re: How to reference %Location outside of ...?

2011-02-28 Thread Jeff Nokes
onfig(;){ package Apache2::ReadConfig; use strict; use vars qw( $ServerName $ServerRoot $DocumentRoot $User $Group @PerlChildInitHandler @PerlChildExitHandler %DirectoryMatch %Directory %Location ... ); for my $uri (...) { $Location

How to reference %Location outside of ...?

2011-02-28 Thread E R
I have the following block in my httpd.conf file which installs mod-perl handlers for a list of urls: ... for my $uri (...) { $Location{$uri} = ...; } If I wanted to move this code to a normal perl module, how should I reference %Location? Thanks, ER

Re: rewriterule, location, and perlhandler

2009-07-22 Thread Eric Lease Morgan
ct everything after $r->location. (or you can use $r->path_info, if the /etexts/id/ actually exists in your document root). That'll give you the same thing that rewrite is currently stuffing into your id argument. Never use path_info unless you are very sure it is what you want. Path_info

Re: rewriterule, location, and perlhandler

2009-07-22 Thread Torsten Foertsch
On Wed 22 Jul 2009, Adam Prime wrote: > Eric Lease Morgan wrote: > > On Jul 22, 2009, at 12:05 AM, Adam Prime wrote: > > > > By first changing my Location directive to the following: > > > > > >SetHandler perl-script > >PerlHandler Apac

Re: rewriterule, location, and perlhandler

2009-07-22 Thread Adam Prime
Eric Lease Morgan wrote: On Jul 22, 2009, at 12:05 AM, Adam Prime wrote: By first changing my Location directive to the following: SetHandler perl-script PerlHandler Apache2::Alex::SemanticWeb And then changing my RewriteRule to this: RewriteRule ^/etexts/id/(.*) /sandbox

Re: rewriterule, location, and perlhandler

2009-07-22 Thread Eric Lease Morgan
so my mod_perl packages get executed without the existence of a file? You need to use Handlers. See this link for a really simple example of a ResponseHandler, and how to configure it. http://perl.apache.org/docs/2.0/user/intro/start_fast.html#Handler_Modules By first changing my Loc

Re: rewriterule, location, and perlhandler

2009-07-21 Thread Adam Prime
Eric Lease Morgan wrote: > > On Jul 21, 2009, at 9:45 PM, Nick Wellnhofer wrote: > >>> What am I doing wrong? Does an actual file need to exist in order for >>> mod_perl to find it? >> >> No. > > > I didn't think so, but what sort of configuration do I need to do so my > mod_perl packages get e

Re: rewriterule, location, and perlhandler

2009-07-21 Thread Eric Lease Morgan
On Jul 21, 2009, at 9:45 PM, Nick Wellnhofer wrote: What am I doing wrong? Does an actual file need to exist in order for mod_perl to find it? No. I didn't think so, but what sort of configuration do I need to do so my mod_perl packages get executed without the existence of a file? --

Re: rewriterule, location, and perlhandler

2009-07-21 Thread Nick Wellnhofer
Eric Lease Morgan wrote: > What am I doing wrong? Does an actual file need to exist in order for > mod_perl to find it? No. > How should I edit httpd.conf so I can: 1) rewrite > GET requests, and 2) execute the result in a mod_perl module? Try the mod_rewrite "passthrough" (PT) flag: Rewrit

Re: rewriterule, location, and perlhandler [resolved]

2009-07-21 Thread Eric Lease Morgan
On Jul 21, 2009, at 9:32 PM, Eric Lease Morgan wrote: How do I get Apache's RewriteRule, Location, and PerlHander to work nicely together?... I now want to implement a RewriteRule -- a la a "cool" linked data URL -- to redirect URLs with a specific shape to SemanticWeb.pm,

rewriterule, location, and perlhandler

2009-07-21 Thread Eric Lease Morgan
How do I get Apache's RewriteRule, Location, and PerlHander to work nicely together? I have a the following Hello World mod_perl module: package Apache2::Alex::SemanticWeb; use Apache2::Const -compile => qw( OK ); use strict; sub handler { my $r = shift; $r->c

Re: mod_perl v2 documentation bugs: location of PerlOptions +Parent, PerlSwitches

2009-01-11 Thread Mark Hedges
v.html > > PerlOptions ITERATEDIR > > ...but when I add > PerlOptions +Parent > > to my apache.conf, I get the error message: >Invalid per-directory PerlOption: Parent http://perl.apache.org/docs/2.0/user/config/config.html#C_Parent_ ... seems to app

mod_perl v2 documentation bugs: location of PerlOptions +Parent, PerlSwitches

2009-01-09 Thread Rohan Carly
I use mod_perl 2.0.3, Apache/2.2.4, Perl 5.8.8 on Linux. I encountered some problems that would have been easier to solve with more documentation. 1. mod_perl Directives Argument Types and Allowed Location http://perl.apache.org/docs/2.0/user/config/config.html

Re: Perl directive not allowed in a Location block

2008-01-25 Thread kgerbasi
n I try to start Apache. The config >>>> works ok in 1.3, however in 2.2 I get the following error 'Perl >>>> directive >>>> not allowed in a block'. >>>> >>>> Can I no longer put a perl directive in a location block? >

Re: Perl directive not allowed in a Location block

2008-01-24 Thread Philippe M. Chiasson
lowed in a block'. Can I no longer put a perl directive in a location block? Not anymore, no. Can you post a more detailled example of what you are trying to do? -- Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5 http://gozer.ectoplasm.org/ m/gozer\@(apache

Re: Perl directive not allowed in a Location block

2008-01-24 Thread kgerbasi
Perl directive >> not allowed in a block'. >> >> Can I no longer put a perl directive in a location block? > > Not anymore, no. > > Can you post a more detailled example of what you are trying to do? > > -- > Philippe M. Chiasson GPG: F9BFE0C2

Re: Perl directive not allowed in a Location block

2008-01-24 Thread Philippe M. Chiasson
perl directive in a location block? Not anymore, no. Can you post a more detailled example of what you are trying to do? -- Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5 http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/ signature.asc Descr

Perl directive not allowed in a Location block

2008-01-24 Thread kgerbasi
I am currently upgrading our Apache server from 1.3 to 2.2 and I'm encountering the following error when I try to start Apache. The config works ok in 1.3, however in 2.2 I get the following error 'Perl directive not allowed in a block'. Can I no longer put a perl directiv

Re: [Question] mod_perl2 W3C HTML Tidy handler location

2007-11-16 Thread Joseph Crotty
On Nov 16, 2007, at 7:27 PM, Jonathan Vanasco wrote: On Nov 16, 2007, at 6:13 PM, Fred Moyer wrote: I'm pretty sure you can use Apache::Clean as an output filter to do this. http://search.cpan.org/~geoff/Apache-Clean-2.00_7/ I believe the OP wanted the exact opposite I *hope* this is f

Re: [Question] mod_perl2 W3C HTML Tidy handler location

2007-11-16 Thread Joseph Crotty
On Nov 16, 2007, at 4:13 PM, Fred Moyer wrote: Joseph Crotty wrote: Want to set up tidy to automatically pretty print and indent HTML (i.e., post PHP processing) and show errors via a mod_perl handler, but not sure where to best do that? Output Filter? I'm pretty sure you can use Apache:

Re: [Question] mod_perl2 W3C HTML Tidy handler location

2007-11-16 Thread Jonathan Vanasco
On Nov 16, 2007, at 6:13 PM, Fred Moyer wrote: I'm pretty sure you can use Apache::Clean as an output filter to do this. http://search.cpan.org/~geoff/Apache-Clean-2.00_7/ I believe the OP wanted the exact opposite I *hope* this is for a dev-only use - as it would be really silly to tid

Re: [Question] mod_perl2 W3C HTML Tidy handler location

2007-11-16 Thread Fred Moyer
Joseph Crotty wrote: Want to set up tidy to automatically pretty print and indent HTML (i.e., post PHP processing) and show errors via a mod_perl handler, but not sure where to best do that? Output Filter? I'm pretty sure you can use Apache::Clean as an output filter to do this. http://searc

[Question] mod_perl2 W3C HTML Tidy handler location

2007-11-16 Thread Joseph Crotty
Want to set up tidy to automatically pretty print and indent HTML (i.e., post PHP processing) and show errors via a mod_perl handler, but not sure where to best do that? Output Filter? Or is there an easier way to do this without using mod_perl2? I have dug around on Google extensively an

Re: Apache config and mod_perl location?

2007-10-20 Thread Randy Kobes
On Sat, 20 Oct 2007, Michael Moon wrote: When I attempt to start apache I get the error Invalid command PerlModule. Obviously I don't have httpd.conf configured correctly, You need to first enable mod_perl in httpd.conf; see http://perl.apache.org/docs/2.0/user/config/config.html#Enabling_mo

RE: Apache config and mod_perl location?

2007-10-20 Thread Michael Moon
: modperl@perl.apache.org Subject: Apache config and mod_perl location? When I attempt to start apache I get the error Invalid command PerlModule. Obviously I don't have httpd.conf configured correctly, but in reading the instructions I don't understand what directory I am supposed

Apache config and mod_perl location?

2007-10-20 Thread Michael Moon
When I attempt to start apache I get the error Invalid command PerlModule. Obviously I don't have httpd.conf configured correctly, but in reading the instructions I don't understand what directory I am supposed to use for the Alias /perl/ directory. Make test and make install ran without

Re: location header

2007-10-16 Thread Perrin Harkins
On 10/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > when i put warn command after the life to fetch the > $location value,It doesn't yield any value. > my $location = $r->headers_out->get('Location'); There won't be anything there unless you put

Re: mod_jk and mod_perl combined - how to stack location handlers?

2007-09-25 Thread Torsten Krah
Am Dienstag, 25. September 2007 schrieb Torsten Krah: > Am Dienstag, 25. September 2007 schrieben Sie: > > On 9/25/07, Torsten Krah <[EMAIL PROTECTED]> wrote: > > > mod_jk registers the same way for Locations like mod_perl does. > > > Can i register "2" handlers or how can i solve this problem? > >

Re: mod_jk and mod_perl combined - how to stack location handlers?

2007-09-25 Thread Torsten Krah
Am Dienstag, 25. September 2007 schrieben Sie: > On 9/25/07, Torsten Krah <[EMAIL PROTECTED]> wrote: > > mod_jk registers the same way for Locations like mod_perl does. > > Can i register "2" handlers or how can i solve this problem? > > > > I want to filter the output from mod_jk (SetHandler jakar

Re: mod_jk and mod_perl combined - how to stack location handlers?

2007-09-25 Thread Perrin Harkins
On 9/25/07, Torsten Krah <[EMAIL PROTECTED]> wrote: > mod_jk registers the same way for Locations like mod_perl does. > Can i register "2" handlers or how can i solve this problem? > > I want to filter the output from mod_jk (SetHandler jakarte-servlet) - but i > cannot set both in apache configura

mod_jk and mod_perl combined - how to stack location handlers?

2007-09-25 Thread Torsten Krah
Hi. I am using mod_perl to register an output request filter for certain locations. I've tested all with mod_proxy_ajp and it works like expected. Now i have to connect apache <-> tomcat with mod_jk - but thats not that easy as i thought. mod_jk registers the same way for Locations like mod_per

Re: location

2007-05-03 Thread Jonathan Vanasco
On May 3, 2007, at 12:43 PM, Torsten Foertsch wrote: Note that all these functions are methods of the $r object. oh! ok, now i see. that makes total sense. i thought i had to access these methods via their own packages, not that they were exported into the ApacheRequestRec class.

RE: location

2007-05-03 Thread Adam Prime x443
You're probably using Apache2::RequestUtil in startup.pl, or some other file you're also use'ing prior if you aren't getting an error already when you try to call $r->location. Adam -Original Message- From: Jonathan Vanasco [mailto:[EMAIL PROTECTED] Sent: Thursday

Re: location

2007-05-03 Thread Torsten Foertsch
On Thursday 03 May 2007 18:09, Jonathan Vanasco wrote: > On May 3, 2007, at 10:54 AM, Torsten Foertsch wrote: > > You see the location function is created directly in the > > Apache2::RequestRec > > namespace (the PACKAGE = ...). > > > > The perl equival

Re: location

2007-05-03 Thread Jonathan Vanasco
On May 3, 2007, at 10:54 AM, Torsten Foertsch wrote: You see the location function is created directly in the Apache2::RequestRec namespace (the PACKAGE = ...). The perl equivalent would be a file named Apache2/RequestUtil.pm that starts with a "package Apache2::RequestRec" line

Re: location

2007-05-03 Thread Torsten Foertsch
> And according to those docs, RequestUtil ISA RequestRec , not the > other way around. > > location really shouldn't be working out of RequestRec then. This is an excerpt from the generated WrapXS/Apache2/RequestUtil/RequestUtil.xs MODULE = Apache2::RequestUtilPACKAGE = Apache2::R

Re: location

2007-05-03 Thread Jonathan Vanasco
On May 3, 2007, at 2:54 AM, Torsten Foertsch wrote: http://perl.apache.org/docs/2.0/api/Apache2/ RequestUtil.html#C_location_ Thats even odder... $r is a RequestRec, not RequestUtil And according to those docs, RequestUtil ISA RequestRec , not the other way around. location really

Re: location

2007-05-02 Thread Torsten Foertsch
On Thursday 03 May 2007 02:20, Jonathan Vanasco wrote: > I'm cleaning up some code for a dispatch class I wrote, and got very > confused: > > I found that i was accessing location from $r ( ApacheRequestReq > Object ) > > location isn't a documented function of $r

location

2007-05-02 Thread Jonathan Vanasco
I'm cleaning up some code for a dispatch class I wrote, and got very confused: I found that i was accessing location from $r ( ApacheRequestReq Object ) location isn't a documented function of $r though. why is that working for me ?

Location Bug ?

2007-04-15 Thread Jonathan Vanasco
I realized an issue with Location today: $self->PageUser->ApacheRequest->headers_out->set( Location => 'http:// www.domain.com?a=b,c,d' ) will only return the location as http://www.domain.com?a=b which makes sense as , is a reserved character unfortunatel

Re: Location directive in httpd.conf

2006-09-25 Thread Philip M. Gollucci
sajid khan wrote: > Fred, below is sample configuration used > > > SetHandler perl-script > PerlHandler Apache::Hello > PerlSetVar somevar 50 > I'm almost sure this works correctly (but I could be wrong). Can you look at t/response/TestModperl/setupenv.pm and see if your case is covered. I b

Re: Location directive in httpd.conf

2006-09-25 Thread sajid khan
looking or missing anything, I am not able to read the "somevar" from the handler in apache 2ThanksOn 9/22/06, Fred Moyer <[EMAIL PROTECTED]> wrote: On Thu, 21 Sep 2006 1:51 pm, sajid khan wrote:> I asked the below question in apache user group as well, but with no> answers>>

Re: Location directive in httpd.conf

2006-09-21 Thread Fred Moyer
On Thu, 21 Sep 2006 1:51 pm, sajid khan wrote: I asked the below question in apache user group as well, but with no answers We have 2 location directives, one for all the requests ( ... ) and one for specific url . We declare some variables using PerlSetVar inside those and read from the

Location directive in httpd.conf

2006-09-21 Thread sajid khan
I asked the below question in apache user group as well, but with no answersWe have 2 location directives, one for all the requests ( ... ) and one for specific url . We declare some variables using PerlSetVar inside those and read from the perl scripts. In Apache 1.3 , I am able to read the

Re: Rewriting "Location:" in an "ErrorDocument 302" not working. Ideas?

2006-08-10 Thread Jason Porritt
Thanks for the reply, Geoff.  Matt and I have found what seems to be a reasonable way to accomplish our goal using a Perl Output Filter Handler set up for the specific problem in Apache.  The following handler rewrites the Location HTTP header as needed: ---sub handler {    my ($f) = @_;    if

Re: Rewriting "Location:" in an "ErrorDocument 302" not working. Ideas?

2006-08-08 Thread Geoffrey Young
ErrorDocument 302" and a > little custom handler would work out best. Getting the "Location" out of > the original redirect is no problem -- we just use: > > $r->prev->headers_out->get('Location'); > > BUT, for the life of me I cannot figure

Re: Rewriting "Location:" in an "ErrorDocument 302" not working. Ideas?

2006-08-07 Thread Matt Hahnfeld
're handling (302 w/ Location: header). Subrequests come into play because ErrorDocuments are loaded as subrequests. > that said- i don't understand how mod_proxy and subrequests fit into > all of this-- if you're rewriting redirects , it would seem that > you're on a m

Re: Rewriting "Location:" in an "ErrorDocument 302" not working. Ideas?

2006-08-07 Thread Jonathan Vanasco
data::dumper lines before the $location . also this might sound stupid, but i've noticed that some apache params want ->xxx() while others want ->xxx -- did you try ->prev() ? that said- i don't understand how mod_proxy and subrequests fit into all of this-- if you&#

Rewriting "Location:" in an "ErrorDocument 302" not working. Ideas?

2006-08-07 Thread Matt Hahnfeld
om handler would work out best. Getting the "Location" out of the original redirect is no problem -- we just use: $r->prev->headers_out->get('Location'); BUT, for the life of me I cannot figure out to rewrite the "Location:" header to something different! F

Re: Location, filename, path_info

2006-07-31 Thread Scott Penrose
On 31/07/2006, at 23:15, Michael Peters wrote: Are you saying that /xyz does exist in your document root? I've found that Apache won't work if you mix a virtual directory, real directory and path_info. This is because PATH_INFO is what ever is left over after url => file name mapping. If t

Re: Location, filename, path_info

2006-07-31 Thread Michael Peters
Scott Penrose wrote: > Hey ho > > I have a simple configuration: > > PerlModule Test::FH > > SetHandler perl-script > PerlResponseHandler Test::FH > > > Now I go to the URL http://www.myhost.com/xyz/abc/qqq/123 > > Inside my code I want to get "/ggg/123" so I try > > pr

Location, filename, path_info

2006-07-31 Thread Scott Penrose
path_info . "\n"; This returns "/abc/ggg/123" Now it always drops the top level "/xyz" - assumably because it is effectively a file in the root directory. One way to fix it is to create all the directories, but not too many. Now what I really want is anything afte

Re: Location and AuthDBI

2006-03-29 Thread Christopher Hicks
On Sun, 26 Mar 2006, Christopher Hicks wrote: I've run into quite an oddity trying to get AuthDBI to work on a current CentOS box. [EMAIL PROTECTED] conf.d]# rpm -q httpd httpd-2.0.52-22.ent.centos4 [EMAIL PROTECTED] conf.d]# httpd -V Server version: Apache/2.0.5

Location and AuthDBI

2006-03-26 Thread Christopher Hicks
I've run into quite an oddity trying to get AuthDBI to work on a current CentOS box. [EMAIL PROTECTED] conf.d]# rpm -q httpd httpd-2.0.52-22.ent.centos4 [EMAIL PROTECTED] conf.d]# httpd -V Server version: Apache/2.0.52 Server built: Jan 5 2006 11:54:39

Re: [mp2] Installing mod_perl packages into different location than default

2005-12-03 Thread Philip M. Gollucci
Jozef Kosoru wrote: On Sat, Dec 03, 2005 at 02:31:06 -0500, Philip M. Gollucci wrote: Jozef Kosoru wrote: $ perl Makefile.PL PREFIX=/home/webuser/perl/ Unfortunately that doesn't work. It still tries to use global directory: Can't open file /usr/lib/perl5/site_perl/5.8.6/i686-linux-threa

Re: [mp2] Installing mod_perl packages into different location than default

2005-12-03 Thread Jozef Kosoru
On Sat, Dec 03, 2005 at 02:31:06 -0500, Philip M. Gollucci wrote: > >Jozef Kosoru wrote: > >>> $ perl Makefile.PL PREFIX=/home/webuser/perl/ > >> > >>Unfortunately that doesn't work. It still tries to use global > >>directory: > >> > >> Can't open file > >> > >>/usr/lib/perl5/site_perl/5.8.6/

Re: [mp2] Installing mod_perl packages into different location than default

2005-12-02 Thread Philip M. Gollucci
Philip M. Gollucci wrote: Jozef Kosoru wrote: $ perl Makefile.PL PREFIX=/home/webuser/perl/ Unfortunately that doesn't work. It still tries to use global directory: Can't open file /usr/lib/perl5/site_perl/5.8.6/i686-linux-thread-multi/auto/mod_perl2/.packlist: Permission denied

Re: [mp2] Installing mod_perl packages into different location than default

2005-12-02 Thread Philip M. Gollucci
Jozef Kosoru wrote: $ perl Makefile.PL PREFIX=/home/webuser/perl/ Unfortunately that doesn't work. It still tries to use global directory: Can't open file /usr/lib/perl5/site_perl/5.8.6/i686-linux-thread-multi/auto/mod_perl2/.packlist: Permission denied at /usr/lib/perl5/5.8.6/ExtUti

Re: [mp2] Installing mod_perl packages into different location than default

2005-12-02 Thread Jozef Kosoru
On Fri, Dec 02, 2005 at 18:27:21 -0600, Frank Wiles wrote: > On Sat, 3 Dec 2005 01:12:41 +0100 Jozef Kosoru wrote: > > Is there a way how to install mod_perl packages into different > > location than it chooses by default? > > [...] > > You should be able to use

Re: [mp2] Installing mod_perl packages into different location than default

2005-12-02 Thread Frank Wiles
On Sat, 3 Dec 2005 01:12:41 +0100 Jozef Kosoru <[EMAIL PROTECTED]> wrote: > Hello, > > Is there a way how to install mod_perl packages into different > location than it chooses by default? > > For example on my system it always tries to instal into > "/usr/lib/

[mp2] Installing mod_perl packages into different location than default

2005-12-02 Thread Jozef Kosoru
Hello, Is there a way how to install mod_perl packages into different location than it chooses by default? For example on my system it always tries to instal into "/usr/lib/perl5/5.8.6/" but I want install all packages into user's directory eg. "/home/webuser/perl/&q

Re: A handler just for the / location

2005-10-14 Thread Carl Johnstone
Yes it also handles that path (no-path) I heard that some browsers use to add the "/" after the location if it doesn't end in "/", but I am not sure they do that because for example if I have an URL like: http://www.site.com/test then Internet Explorer doesn'

Re: A handler just for the / location

2005-10-13 Thread Geoffrey Young
Octavian Rasnita wrote: > From: "Geoffrey Young" <[EMAIL PROTECTED]> > >>/ is required per the rfc, so you cannot omit it. go ahead and try it via >>telnet on your favorite site :) >> >>--Geoff > > > Well, here it is just a test: > > telnet www.site.com 80 > GET HTTP://www.site.com HTTP/1.1

Re: A handler just for the / location

2005-10-13 Thread Octavian Rasnita
etHandler perl-script > > PerlResponseHandler ModPerl::Testing > > > Does that still for for example > http://google.com > vs > http://google.com/ > > -- > END Yes it also handles that path (no-path) I heard that some browsers use to add the "/&qu

Re: A handler just for the / location

2005-10-13 Thread Octavian Rasnita
From: "Geoffrey Young" <[EMAIL PROTECTED]> > > / is required per the rfc, so you cannot omit it. go ahead and try it via > telnet on your favorite site :) > > --Geoff Well, here it is just a test: telnet www.site.com 80 GET HTTP://www.site.com HTTP/1.1 Host: www.site.com And it works. So my opi

Re: A handler just for the / location

2005-10-13 Thread Geoffrey Young
Adam Prime x443 wrote: > If you type http://domain.com into a browser, it issues a request for /. > (at least firefox does). > > I doubt you can do a GET request for an empty path, / is required per the rfc, so you cannot omit it. go ahead and try it via telnet on your favorite site :) --Geof

RE: A handler just for the / location

2005-10-13 Thread Adam Prime x443
it would still work. Adam -Original Message- From: Philip M. Gollucci [mailto:[EMAIL PROTECTED] Sent: Thursday, October 13, 2005 3:05 PM To: Octavian Rasnita Cc: modperl@perl.apache.org Subject: Re: A handler just for the / location Octavian Rasnita wrote: > Instead of using: >

Re: A handler just for the / location

2005-10-13 Thread Philip M. Gollucci
Octavian Rasnita wrote: Instead of using: SetHandler perl-script PerlResponseHandler ModPerl::Testing I can use: SetHandler perl-script PerlResponseHandler ModPerl::Testing Does that still for for example http://google.com vs http://google.com/ -- END

A handler just for the / location

2005-10-13 Thread Octavian Rasnita
Hi, I have asked on this list about how I can put a handler listen just to the / location, but not to other locations which are not handled by other perl handlers. I found the answer, and here it is: Instead of using: SetHandler perl-script PerlResponseHandler ModPerl::Testing I can use

Re: Any way for a PerlHandler to know what Location block it's in?

2005-06-08 Thread John Siracusa
On 6/8/05, Dorian Taylor <[EMAIL PROTECTED]> wrote: > $r->location will also return whatever's in a LocationMatch, Directory > and DirectoryMatch directive, should the scope of the request lay > in one of those. if you're simply clipping the location off the > fro

Re: Any way for a PerlHandler to know what Location block it's in?

2005-06-08 Thread Dorian Taylor
On Wed, Jun 08, 2005 at 12:00:23PM -0400, John Siracusa wrote: > On 6/8/05, Geoffrey Young <[EMAIL PROTECTED]> wrote: > > $r->location() ? > > Duh, I'm an idiot. Thanks :) > > -John $r->location will also return whatever's in a LocationMatch, Directo

Re: Any way for a PerlHandler to know what Location block it's in?

2005-06-08 Thread John Siracusa
On 6/8/05, Geoffrey Young <[EMAIL PROTECTED]> wrote: > $r->location() ? Duh, I'm an idiot. Thanks :) -John

Re: Any way for a PerlHandler to know what Location block it's in?

2005-06-08 Thread Michael Peters
> I want to ditch the "PerlSetVar MyRoot" line because it will always have > the same value as the "Location" directiv above it. Is there a way MyModule > can get "/foo/bar" using some other means? I feel almost silly saying this, but did you look at $r->loca

Any way for a PerlHandler to know what Location block it's in?

2005-06-08 Thread John Siracusa
Confusing subject, simple question: PerlSetVar MyRoot "/foo/bar" SetHandler perl-script PerlHandler MyModule MyModule calls $r->dir_config('MyRoot') to get the "/foo/bar" path. I want to ditch the "PerlSetVar MyRoot" line because it will

Re: $r->location() question

2005-05-25 Thread Stas Bekman
Adam Prime x443 wrote: Assume i have a handler that sits in a location, and that handler has it's own admin interface built in. I also want to be able to easily change the directory that the handler is running in, or have it running in multiple locations (so i don't want to ha

$r->location() question

2005-05-25 Thread Adam Prime x443
Assume i have a handler that sits in a location, and that handler has it's own admin interface built in. I also want to be able to easily change the directory that the handler is running in, or have it running in multiple locations (so i don't want to hardcode the location into

Re: [mp2] Problem with custom config in Location

2005-05-23 Thread Stas Bekman
Herve Guillemet wrote: Herve, you've uncovered a bloody global perl context switch bug. Please try this patch (the reproducing tar ball now works for me under worker) This test does run successfully with your patch. Now define two directives. Use one inside the Location, another ou

Re: [mp2] Problem with custom config in Location

2005-05-21 Thread Herve Guillemet
Herve, you've uncovered a bloody global perl context switch bug. Please try this patch (the reproducing tar ball now works for me under worker) This test does run successfully with your patch. Now define two directives. Use one inside the Location, another outside, and core dumps again.

Re: [mp2] Problem with custom config in Location

2005-05-21 Thread Herve Guillemet
On Fri, 20 May 2005, Stas Bekman wrote: Herve, you've uncovered a bloody global perl context switch bug. Please try this patch (the reproducing tar ball now works for me under worker) This test does run successfully with your patch. Now define two directives. Use one inside the Loc

Re: [mp2] Problem with custom config in Location

2005-05-20 Thread Stas Bekman
Herve Guillemet wrote: Stas Bekman wrote: Herve, you've uncovered a bloody global perl context switch bug. Please try this patch (the reproducing tar ball now works for me under worker) This test does run successfully with your patch. Now define two directives. Use one inside the Loc

Re: [mp2] Problem with custom config in Location

2005-05-20 Thread Herve Guillemet
Stas Bekman wrote: Herve, you've uncovered a bloody global perl context switch bug. Please try this patch (the reproducing tar ball now works for me under worker) This test does run successfully with your patch. Now define two directives. Use one inside the Location, another outside, and

Re: [mp2] Problem with custom config in Location

2005-05-20 Thread Stas Bekman
Herve Guillemet wrote: New report: [...] #22 0x08066b3d in worker_thread (thd=0x8231f18, dummy=0x0) at worker.c:835 #23 0x4010f2f1 in dummy_worker (opaque=0x0) at thread.c:105 #24 0x4019a54e in pthread_start_thread () from /lib/libpthread.so.0 #25 0x402a3b8a in clone () from /lib/libc.so.6 Thanks f

Re: [mp2] Problem with custom config in Location

2005-05-20 Thread Herve Guillemet
New report: --- 1. Problem Description: A custom apache config directive defined in a together with a PerlResponseHandler makes the request handling crash (apache dumps core, see below). Nothing printed in the error_log nor the access_log. httpd.conf contains: PerlLoadModule

Re: [mp2] Problem with custom config in Location

2005-05-20 Thread Stas Bekman
Herve Guillemet wrote: On Thu, 19 May 2005, Stas Bekman wrote: Herve Guillemet wrote: 1. Problem Description: A custom apache config directive defined in a together with a PerlResponseHandler makes the request handling crash. Herve, have you considered to check the error_log before reporting a

Re: [mp2] Problem with custom config in Location

2005-05-20 Thread Herve Guillemet
On Thu, 19 May 2005, Stas Bekman wrote: Herve Guillemet wrote: 1. Problem Description: A custom apache config directive defined in a together with a PerlResponseHandler makes the request handling crash. Herve, have you considered to check the error_log before reporting a problem? Your code is im

Re: [mp2] Problem with custom config in Location

2005-05-19 Thread Stas Bekman
forgot the attachment. -- __ Stas BekmanJAm_pH --> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http:/

Re: [mp2] Problem with custom config in Location

2005-05-19 Thread Stas Bekman
Herve Guillemet wrote: 1. Problem Description: A custom apache config directive defined in a together with a PerlResponseHandler makes the request handling crash. Herve, have you considered to check the error_log before reporting a problem? Your code is improperly written and the error_log should

[mp2] Problem with custom config in Location

2005-05-19 Thread Herve Guillemet
1. Problem Description: A custom apache config directive defined in a together with a PerlResponseHandler makes the request handling crash. httpd.conf contains: PerlLoadModule Xi::TestConf XiTest test SetHandler modperl PerlResponseHandler Xi::Test TestConf.pm: --

Re: [mp2] How to get a Location in the modperl handler?

2005-03-01 Thread David Wright
Let's assume that we have these lines in the apache config: SetHandler modperl PerlResponseHandler MyApp::Handler How can MyApp::Handler obtain an information that it is running within "/my/location"? Thank you for any help! Jozef

Re: [mp2] How to get a Location in the modperl handler?

2005-03-01 Thread Ian Joyce
> > How can MyApp::Handler obtain an information that it is running > within "/my/location"? > > Thank you for any help! > > Jozef > > -- > jozef kosoru > http://zyzstar.kosoru.com > $r->location --Ian

[mp2] How to get a Location in the modperl handler?

2005-03-01 Thread Jozef Kosoru
Hello, Let's assume that we have these lines in the apache config: SetHandler modperl PerlResponseHandler MyApp::Handler How can MyApp::Handler obtain an information that it is running within "/my/location"? Thank you for a

Re: MP2 Location and PerlModule

2005-01-30 Thread Philippe M. Chiasson
Stas Bekman wrote: angie ahl wrote: [...] It's explained here: http://perl.apache.org/docs/2.0/user/config/config.html#mod_perl_Directives_Argument_Types_and_Allowed_Location I suppose we could add an xref to this section from all config directives to make it more clear. So if you look at PerlM

Re: MP2 Location and PerlModule

2005-01-27 Thread Stas Bekman
angie ahl wrote: Hello me ;) things appear to have changed. I can't tell me why but this works: SetHandler modperl PerlResponseHandler Apache::Status nicer if I ask myself. It's explained here: http://perl.apache.org/docs/2.0/user/config/config.html#mod_per

Re: MP2 Location and PerlModule

2005-01-27 Thread angie ahl
SetHandler perl-script > > PerlHandler Apache::Status > > > > > > > > And Apache is giving me the following syntax error when I test the config: > > > > PerlModule directive not allowed in a block > > > > Is this true, it used to work with MP/Apache 1. I can't find any ref > > on the net that indicates you can't use PerlModule in a Location > > Directive. > > > > Clues anyone. > > > > Thanks > > > > Angie > > >

Re: MP2 Location and PerlModule

2005-01-27 Thread angie ahl
> > And Apache is giving me the following syntax error when I test the config: > > PerlModule directive not allowed in a block > > Is this true, it used to work with MP/Apache 1. I can't find any ref > on the net that indicates you can't use PerlModule in a Location > Directive. > > Clues anyone. > > Thanks > > Angie >

MP2 Location and PerlModule

2005-01-27 Thread angie ahl
x27;t use PerlModule in a Location Directive. Clues anyone. Thanks Angie

Re: [mp2] fun with $r->location

2005-01-12 Thread Geoffrey Young
> GET /foo/ yields the listing for /foo/, and NopHandler logs > $r->location to the error log as /foo. > > GET /foo/bar yields the results of NopResponse (which just coughs > up its $r->location, /foo/bar), and NopHandler logs $r->location > as /foo/bar, even

  1   2   >