# Literal newlines dumped to error log when %0a in URL

**URL:** <https://www.ruby-forum.com/t/literal-newlines-dumped-to-error-log-when-0a-in-url/221712>\
**Category:** NGINX\
**Created:** [July 27, 2012, 3:24am UTC](https://www.ruby-forum.com/t/literal-newlines-dumped-to-error-log-when-0a-in-url/221712 "2012-07-27T03:24:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [July 27, 2012, 3:24am UTC](https://www.ruby-forum.com/t/literal-newlines-dumped-to-error-log-when-0a-in-url/221712/1 "2012-07-27T03:24:43Z")

</div>

I noticed that when a %0a exists in the URL, nginx includes a literal  
newline in the error\_log when logging a file not found:

* * *

2012/07/26 17:24:14 [error] 5478#0: \*8 "/var/www/localhost/htdocs/

## html/index.html" is not found (2: No such file or directory), client: 1.2.3.4, server: , request: “GET /%0a%0a%0ahtml/ HTTP/1.1”, host: “[test.example.com](http://test.example.com)”

This wreaks havoc with my log monitoring utility 8-/.

It seems desirable to escape the newline in the log message? I tested  
with the latest 1.2.2. Is there any way with the existing configuration  
options to make this not happen, or any interest in updating the logging  
module to handle this situation differently?

Thanks…
