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,
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
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
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
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
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
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
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
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
: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
[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
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
12 matches
Mail list logo