Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

Can I somehow call ap_make_content_type

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


jzobel at heute-morgen

Apr 29, 2012, 1:45 AM

Post #1 of 4 (824 views)
Permalink
Can I somehow call ap_make_content_type

Hi.

Is it possible to access a function (ap_make_content_type) that is only
present in xs/tables/current/Apache2/FunctionTable.pm and
xs/maps/apache2_functions.map but not wrapped any further?

Writing a little piece of XS is doable, but I want to do it the mod_perl
way.

Thx,
Joachim


torsten.foertsch at gmx

Apr 29, 2012, 5:31 AM

Post #2 of 4 (768 views)
Permalink
Re: Can I somehow call ap_make_content_type [In reply to]

On Sunday, 29 April 2012 10:45:41 Joachim Zobel wrote:
> Is it possible to access a function (ap_make_content_type) that is only
> present in xs/tables/current/Apache2/FunctionTable.pm and
> xs/maps/apache2_functions.map but not wrapped any further?

!MODULE=Apache2::HTTPCore
>ap_process_request
>ap_make_content_type
>ap_core_reorder_directories
>ap_index_of_response

It should be enough to change that to

MODULE=Apache2::HTTPCore PACKAGE=Apache2::RequestRec
>ap_process_request
ap_make_content_type
>ap_core_reorder_directories
>ap_index_of_response

Then "perl Makefile.PL && make test"

This builds a new module Apache2::HTTPCore which implements one method:

use Apache2::HTTPCore ();
$newtype=$r->make_content_type($type);

Torsten Förtsch

--
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net


jzobel at heute-morgen

Apr 29, 2012, 5:44 AM

Post #3 of 4 (774 views)
Permalink
Re: Can I somehow call ap_make_content_type [In reply to]

Am Sonntag, den 29.04.2012, 14:31 +0200 schrieb Torsten Förtsch:
> It should be enough to change that to
>
> MODULE=Apache2::HTTPCore PACKAGE=Apache2::RequestRec
> >ap_process_request
> ap_make_content_type
> >ap_core_reorder_directories
> >ap_index_of_response

Unfortunately changing mod_perl is not an option, I don't thing this is
an acceptable patch, is it?

I need to do this to fix a bug in my cpan module Cindy-Apache2.

Is there another way?

Thanks,
Joachim


jzobel at heute-morgen

Apr 29, 2012, 6:07 AM

Post #4 of 4 (769 views)
Permalink
Re: Can I somehow call ap_make_content_type [In reply to]

Hi.

It should be possible to add the generated HTTPCore.xs to my module and
that is it, right?

Thx,
Joachim

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.