Re: help on setting up a PerlFixupHandler

2003-08-14 Thread Geoffrey Young
Xavier Noria wrote: [EMAIL PROTECTED] wrote: It seems to me that $r-content-type is for what your server sends to the client, which is probably undef in the Fixup stage, where you test it. You probaly meant to test for the $ct = $r-header_in(Content-type) if you wanted to see whats requested

Re: help on setting up a PerlFixupHandler

2003-08-14 Thread Geoffrey Young
sub handler { my $r = shift; return DECLINED if $r-content_type ne 'text/html'; return SERVER_ERROR unless $r-can_stack_handlers; $r-set_handlers(PerlHandler = ['ContentHandler']); return OK; } What am I missing? unlike the other phases of the

Re: help on setting up a PerlFixupHandler

2003-08-14 Thread Xavier Noria
On Wednesday 06 August 2003 20:26, Christopher Grau wrote: On Wed, Aug 06, 2003 at 08:24:30PM +0200, Xavier Noria wrote: To fix that, is it safe to change the test to defined $r-content_type and $r-content_type ne 'text/html'; or is there a better way? I usually don't concern

Re: help on setting up a PerlFixupHandler

2003-08-14 Thread Christopher Grau
On Wed, Aug 06, 2003 at 08:24:30PM +0200, Xavier Noria wrote: To fix that, is it safe to change the test to defined $r-content_type and $r-content_type ne 'text/html'; or is there a better way? I usually don't concern myself with the previous content type when writing Location-based

Re: help on setting up a PerlFixupHandler

2003-08-14 Thread Xavier Noria
On Wednesday 06 August 2003 19:53, Christopher Grau wrote: Are you sure the content-type is text/html? Since you have your own Location handler, Apache is probably using the value from the DefaultType directive which, I think, defaults to text/plain when Apache is installed. That's it,

help on setting up a PerlFixupHandler

2003-08-14 Thread Xavier Noria
I am trying to write a Hello World!-like set up involving a PerlFixupHandler but cannot get it to work. What I want to accomplish is: 1. Configure Dispatcher.pm as a PerlFixupHandler for http://localhost/admin. 2. Let Dispatcher.pm set ContentHandler.pm as the content

Re: help on setting up a PerlFixupHandler

2003-08-09 Thread Geoffrey Young
So, while I'm not 100% sure about this, logically the $r-content_type should be empty before the response is prepared to be sent to the browser, so it should be empty in the Fixup stage. not necessarily. if you request index.html, mod_mime (at the mime-type phase) will set the content type to

RE: help on setting up a PerlFixupHandler

2003-08-09 Thread csebe
: Thursday, August 07, 2003 3:15 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: help on setting up a PerlFixupHandler So, while I'm not 100% sure about this, logically the $r-content_type should be empty before the response is prepared to be sent to the browser, so it should

Re: help on setting up a PerlFixupHandler

2003-08-08 Thread Christopher Grau
On Wed, Aug 06, 2003 at 07:41:20PM +0200, Xavier Noria wrote: package Dispatcher; use Apache::Constants ':common'; sub handler { my $r = shift; return DECLINED if $r-content_type ne 'text/html'; return SERVER_ERROR unless $r-can_stack_handlers;

RE: help on setting up a PerlFixupHandler

2003-08-08 Thread csebe
[mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 5:36 AM To: Xavier Noria Cc: [EMAIL PROTECTED] Subject: Re: help on setting up a PerlFixupHandler Xavier Noria wrote: [EMAIL PROTECTED] wrote: It seems to me that $r-content-type is for what your server sends to the client

Re: help on setting up a PerlFixupHandler

2003-08-06 Thread Xavier Noria
On Wednesday 06 August 2003 18:29, Geoffrey Young wrote: sub handler { my $r = shift; return DECLINED if $r-content_type ne 'text/html'; return SERVER_ERROR unless $r-can_stack_handlers; $r-set_handlers(PerlHandler = ['ContentHandler']);

Re: help on setting up a PerlFixupHandler

2003-08-06 Thread Xavier Noria
[EMAIL PROTECTED] wrote: It seems to me that $r-content-type is for what your server sends to the client, which is probably undef in the Fixup stage, where you test it. You probaly meant to test for the $ct = $r-header_in(Content-type) if you wanted to see whats requested from the client. But

RE: help on setting up a PerlFixupHandler

2003-08-06 Thread csebe
on setting up a PerlFixupHandler On Wednesday 06 August 2003 20:26, Christopher Grau wrote: On Wed, Aug 06, 2003 at 08:24:30PM +0200, Xavier Noria wrote: To fix that, is it safe to change the test to defined $r-content_type and $r-content_type ne 'text/html