Bug #2228

%p in accesslog.format does not correctly split the port off ipv6 sockets

Added by jo.henke about 4 years ago. Updated about 4 years ago.

Status:FixedStart date:2010-06-24
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:mod_accesslog
Target version:1.4.27
Missing in 1.5.x:No

Description

Hello,

I'm using "%p" in my 'accesslog.format' string to see, how many people actually use SSL. Since I bound lighttpd to a specific IPv6 address (via 'server.bind'), I find strings like the following in the %p column of my log:

cdef:6789::1:80

So it seems like the socket address is split at the first colon instead of the last one. A quick workaround would probably be to replace 'strchr' with 'strrchr' here:

http://redmine.lighttpd.net/projects/lighttpd/repository/revisions/2699/entry/branches/lighttpd-1.4.x/src/mod_accesslog.c#L848

Regards,
Jo.

Associated revisions

Revision 2734
Added by stbuehler about 4 years ago

mod_accesslog: fix %p for ipv6 sockets (fixes #2228, thx jo.henke)

History

#1 Updated by stbuehler about 4 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset r2734.

Also available in: Atom