Re: [modperl 1.27] Problem regarding Perl*Handler and the HTTPrequestline

2002-12-24 Thread Geoffrey Young
I was wondering if it
is
possible to write a handler to handle a 'new http method', because I could
not
find any hint in the user guide. :)


if my 'new http method' you mean something other that GET, POST, PUT, etc 
then no, you cannot (in Apache 1.3, at least).

just about the only thing you cannot do with mod_perl is parse the Request 
Line - that is handled by Apache before the request cycle starts.  so Apache 
will intercept the requests before the PerlPostReadRequestHandler runs, 
similar to the way it intercepts HTTP/1.1 requests without a Host header.

in Apache/mod_perl 2.0, you can write an input filter that _does_ allow you 
do parse the Request Line yourself.  then again, you can write a protocol 
handler for any protocol you can dream up, so there's no reason to mess with 
HTTP :)

--Geoff





Re: [modperl 1.27] Problem regarding Perl*Handler and the HTTPrequestline

2002-12-24 Thread Stas Bekman
in Apache/mod_perl 2.0, you can write an input filter that _does_ allow


you


do parse the Request Line yourself.  then again, you can write a protocol
handler for any protocol you can dream up, so there's no reason to mess with HTTP :)


Actually in 2.0 you can even implement this in a HeaderParser handler. 
Here is such an example:
http://perl.apache.org/docs/2.0/user/handlers/http.html#PerlHeaderParserHandler

Here is an example of the input filter that modifies the request headers 
(as suggested by Geoff):
http://perl.apache.org/docs/2.0/user/handlers/filters.html#Connection_Input_Filters


__
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://modperlbook.org http://apache.org   http://ticketmaster.com