You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Sam Tregar <sa...@tregar.com> on 2005/06/03 19:23:50 UTC

Newline and tab escaping in Apache's error_log

Hello all.  Does anyone know why Apache (v1.3.33) is escaping newlines
and tabs in my error logs?  I'm seeing stuff like:

   [Thu Jun  2 18:54:18 2005] [error] Error executing run mode 'process':
   Unable to find message named 'city_missing' in messages.conf. at
   /home/sam/projectx/lib/Projectx/Message.pm line
   131\n\tProjectx::Message::add_message('city_missing') called at
   /home/sam/projectx/lib/Projectx/Form.pm line
   183\n\tProjectx::Form::_errs_to_messages('Arc..

That can get pretty unreadable for dead stack traces.  Any idea how to
turn it off?

-sam



Re: Newline and tab escaping in Apache's error_log

Posted by Sam Tregar <sa...@tregar.com>.
On Fri, 3 Jun 2005, Michael Peters wrote:

> It's a fairly recent change to apache since some characters could cause
> problems for some text viewers thus creating a security hole (if your
> text reader isnt smart enough).
> 
> You can turn it off by building apache like so:
> 
> CFLAGS="-DAP_UNSAFE_ERROR_LOG_UNESCAPED" ./configure
> make ...

Thanks, that worked perfectly.

-sam

Re: Newline and tab escaping in Apache's error_log

Posted by Michael Peters <mp...@plusthree.com>.

Sam Tregar wrote:
> Hello all.  Does anyone know why Apache (v1.3.33) is escaping newlines
> and tabs in my error logs?  I'm seeing stuff like:
> 
>    [Thu Jun  2 18:54:18 2005] [error] Error executing run mode 'process':
>    Unable to find message named 'city_missing' in messages.conf. at
>    /home/sam/projectx/lib/Projectx/Message.pm line
>    131\n\tProjectx::Message::add_message('city_missing') called at
>    /home/sam/projectx/lib/Projectx/Form.pm line
>    183\n\tProjectx::Form::_errs_to_messages('Arc..
> 
> That can get pretty unreadable for dead stack traces.  Any idea how to
> turn it off?

It's a fairly recent change to apache since some characters could cause
problems for some text viewers thus creating a security hole (if your
text reader isnt smart enough).

You can turn it off by building apache like so:

CFLAGS="-DAP_UNSAFE_ERROR_LOG_UNESCAPED" ./configure
make ...

-- 
Michael Peters
Developer
Plus Three, LP