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
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
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
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
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,
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
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
: 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
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;
[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
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']);
[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 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
13 matches
Mail list logo