Hi Folks,
I'm just in the process of porting a mod_perl 1 CGI::Application to
mod_perl 2, but have hit a problem relating to header manipulation. I am
invoking a local java app using web start by serving up a mime-typed
jnlp file which I am generating from my run mode as follows:
sub get_jnlp {
my $self = shift;
my $session = $self->session();
my $query = $self->query();
$query->header_type('none');
my $template = $self->load_tmpl('jnlp.tmpl');
<!-- snip populating template... -->
$query->header_out( "Content-disposition",
"attachment;filename=$sid.jnlp" );
$query->send_http_header('application/x-java-jnlp-file');
return $template->output();
}
This works fine under mod_perl1, but having looked at the MP2 porting
docs (after it didn't work!), I've modified the $query->header_out line to:
$query->headers_out->{"Content-disposition"} =
"attachment;filename=$sid.jnlp";
however this just gives me the following error:
Can't locate auto/CGI/Application/Plugin/Apache/Request/header_type.al
in @INC....
I have tried removing the 'send_http_header' line as well, but with the
same result...I am using CAP::Apache (installed with the MP2=1
argument....), however I am not sure this is really installed for
mod_perl2, since the installed module still required modules in the
Apache namespace, which I had to modify to Apache2 before it started
working.
Do I need to do something else with the headers to make this work, or
does it look like my CAP::Apache installation is not correct?
Thanks,
James
--
Dr. James Abbott
Bioinformatics Software Developer
Imperial College, London
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]