tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ognjen Blagojevic <>
Subject Use canonical IPv6 text representation in logs
Date Mon, 11 Jul 2011 16:55:13 GMT

In AccessLogValve and on other places where IPv6 address is logged or 
printed, it would bi good if Tomcat would use canonical IPv6 format as 
described in RFC 5952 [1] (especially note section "3.2.2. Logging"), e.g:

1. instead of logging 2001:4000:0:5:0:0:0:66, it should log 
2. instead of logging 0:0:0:0:0:0:0:1, it should log ::1.

What do you think about that?

Class Inet6Address method getHostAddress confirms to RFC 
recommendations, in everything except in zero groups handling. It simply 
prints full form with all zeroes. In Java API I don't see any method to 
convert it to canonical form.

I wrote small utility that converts Inet6Address object into canonical 
representation. Are you interested in such contribution? Should it be 
contributed directly to Tomcat code, or maybe offered to Jakarta Commons 
project (Codec or Net component)? If it is contributed to Jakarta 
Commons project, would it be a problem to use it in Tomcat, because of 
new dependency? Net component seems to be quite big (all kind of 
protocol implementations), while Codec contains only small number of 
conversion classes, so if it is contributed to commons, is Codec 
component better choice?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message