Re: Modperl as backend for mobile apps

John Dunlap <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <CAC5eUSuF2niz_FXq10Tj9pfsvfR2pmSeWc14CKRFLosVp184GA@mail.gmail.com>
We're doing that but, for whatever reason, the only way we were able to get
apache to return JSON instead of HTML was in assbackwards mode

On Mon, Oct 31, 2016 at 10:46 AM, Adam Prime <[email protected]> wrote:

> On 16-10-31 10:34 AM, John Dunlap wrote:
>
>> We do this by processing all requests in an eval block and putting
>> Apache into assbackwards mode so that we can send a 500 response with a
>> JSON response body
>>
>
> You can also do it with $r->custom_response[1] from within your mod_perl
> code itself.
>
> https://perl.apache.org/docs/2.0/api/Apache2/Response.html#C
> _custom_response_
>
> Adam
>



-- 
John Dunlap
*CTO | Lariat *

*Direct:*
*[email protected] <[email protected]>*

*Customer Service:*
877.268.6667
[email protected]
100x60.png (image/png, 2.1 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.