https://bz.apache.org/bugzilla/show_bug.cgi?id=65696
--- Comment #4 from abernal <[email protected]> --- Proposed fix: https://github.com/apache/httpd/pull/1016 Following up on comment 3 (Yann Ylavic's suggestion of a new ErrorLogFormat arg letter, since changing the default "%a"/"%A" output risks breaking existing log parsers): added an opt-in "b" flag, "%{b}a" and "%{b}A", that writes the IPv6 address and port in RFC 5952, section 6 bracket notation, "[address]:port", instead of today's ambiguous "address:port". The default "%a"/"%A"/"%{c}a" output is completely unchanged. For reference, this is the same convention other HTTP libraries already use for the identical ambiguity: Netty's NetUtil.toSocketAddressString() and OkHttp's HttpUrl.Builder.toString() both bracket an IPv6 host before appending ":port". Checked both implementations directly. Reproduced and verified on a real build: with Listen [::1]:<port> and "ErrorLogFormat \"a=%a ba=%{b}a A=%A bA=%{b}A %M\"", a request over ::1 logs "a=::1:51710 ba=[::1]:51710 A=::1:18200 bA=[::1]:18200" -- %a/%A keep the old ambiguous form, %{b}a/%{b}A get the bracketed one. Pytest regression test included in the PR. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
