perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Prime <adam.pr...@utoronto.ca>
Subject Re: How to write a handler
Date Fri, 31 Jul 2009 12:51:27 GMT
Sudheer Puppala wrote:
> Hi
> 
>   I am java/flex programmer since 1yrs and a little bit of perl. I have 
> a requirement of write a
> handler at apache http server side using perl.
> 
> Scenario:
> 
> 
>   1. My flex application request for a particular file to the apache
>   server.
>   2. The server upon receiving a request look for the mime type of the
> 
>   file. If that file mime type is video/flv or .flv I should write a handler
>   for that.
> 
>   3. The handler should be in a position to call a java class. where I will
> 
>   decrypt the fille and send it back to the flex application.
> 
> 
> Here my request is how can I write my own handler? where can I write it? and
> as I am not a perl programmer, I am not getting the solution for that. So
> could any one help me with an example.

I'd start here:

http://perl.apache.org/docs/2.0/user/handlers/intro.html

to get the headers (including the content-type) from the incoming request:

http://perl.apache.org/docs/2.0/api/Apache2/RequestRec.html#C_headers_in_

to run Java code you can look at:

http://search.cpan.org/~patl/Inline-Java-0.52/Java.pod

Hopefully that should point you in the right direction.

Adam

Mime
View raw message