2011/7/11 Ognjen Blagojevic <ognjen.d.blagoje...@gmail.com>: > Hi, > > 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 > 2001:4000:0:5::66, > 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? > > Regards, > Ognjen > > [1] http://tools.ietf.org/html/rfc5952
1. One should really ask system administrators what they prefer (or provide a configuration option). Personally I would prefer the full address, as I think it is easier when all is data is visible, and it is easier to search or filter. If there are several sequences of zeros, only one of them can be collapsed. This introduces ambiguity when trying to specify a search filter. 2. If you want to contribute, please create a bugzilla entry, mark it as an enhancement. The class may go into org.apache.tomcat.util.net. I would prefer to see some JUnit tests together with the class. 3. Regarding Apache Commons: you can ask on their mailing lists. When Tomcat uses some code from Apache Commons we always rename it into different package, to avoid conflicts with the same libraries used by web applications. There are two approaches a) it is copied into our source tree - such are Commons FileUpload, Commons Digester, Commons Modeler and Apache BCEL. b) original sources are processed through renaming filter and recompiled when Tomcat builds - such are Commons Logging, Commons Pool and Commons DBCP. As thus, your contribution to Tomcat can be independent from Commons. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org