Commit e9e02a49 authored by Tollef Fog Heen's avatar Tollef Fog Heen

Support for \t\n in varnishncsa format strings

parent 56d17a6d
......@@ -629,6 +629,14 @@ h_ncsa(void *priv, enum VSL_tag_e tag, unsigned fd,
for (p = format; *p != '\0'; p++) {
/* allow the most essential escape sequences in format. */
if (*p == '\\') {
p++;
if (*p == 't') VSB_putc(os, '\t');
if (*p == 'n') VSB_putc(os, '\n');
continue;
}
if (*p != '%') {
VSB_putc(os, *p);
continue;
......
......@@ -54,6 +54,8 @@ The following options are available:
%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i"
Escape sequences \\n and \\t are supported.
Supported formatters are:
%b
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment