[Varnish] #1748: varnishncsa: logged spaces in userid
Varnish
varnish-bugs at varnish-cache.org
Tue Jun 9 11:15:26 CEST 2015
#1748: varnishncsa: logged spaces in userid
-------------------------+--------------------
Reporter: mandark | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishncsa | Version: 3.0.5
Severity: normal | Resolution:
Keywords: |
-------------------------+--------------------
Comment (by Dridi):
Hi,
It's the same behaviour's as httpd's logging. Varnishncsa's default format
is the combined log format in http's documentation
(https://httpd.apache.org/docs/current/logs.html#combined).
If you expect usernames containing spaces, you should change the pattern
to:
{{{
%h %l "%u" %t "%r" %s %b "%{Referer}i" "%{User-agent}i"
}}}
If your log parser breaks on valid ncsa output, you should report it to
the parser's authors instead.
You said:
> What's wrong ? Nothing at first, yet I think the NCSA format is a great
one because the number of fields is constant as no field can contain space
but the user agent, and, the user agent is last so there is no ambiguity.
The %r pattern represents the HTTP request's start-line which by
definition contains one or two spaces (one space if you're using
HTTP/0.9). For this reason, it needs to be quoted to be seen as a single
field, and as you can see, it is.
There is also no constant number of fields, from the documentation link
above, the combined format is one of the defaults in httpd, there is also
common which is a subset of combined.
There's nothing wrong with varnishncsa.
Best Regards,
Dridi
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1748#comment:1>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list