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 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,

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 -based con

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 r

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

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-09 Thread csebe
ROTECTED] > Sent: 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 em

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 t

RE: help on setting up a PerlFixupHandler

2003-08-08 Thread csebe
e loop and what they read/or set. Most of these one can guess but I'm not aware of such a documentation. Regards, Lian Sebe, M.Sc. Freelance Analyst-Programmer www.programEz.net > -Original Message- > From: Geoffrey Young [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 07, 2003 5

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_handl

RE: help on setting up a PerlFixupHandler

2003-08-06 Thread csebe
:40 PM > To: [EMAIL PROTECTED] > Subject: Re: help 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

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 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 => ['ContentHand