[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-2158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17339690#comment-17339690
 ] 

Oleg Kalnichevski commented on HTTPCLIENT-2158:
-----------------------------------------------

[~hbabureddy] Now I am no longer sure there is anything wrong with 
`DefaultHostnameVerifier` in HttpClient 

These tests pass for me.
{code:java}
Assert.assertEquals("2001:db8:aaaa:bbbb:cccc:0:0:1", 
DefaultHostnameVerifier.normaliseAddress("2001:0db8:aaaa:bbbb:cccc:0:0:0001"));
Assert.assertEquals("2001:db8:aaaa:bbbb:cccc:0:0:1", 
DefaultHostnameVerifier.normaliseAddress("2001:0db8:aaaa:bbbb:cccc::1"));
Assert.assertEquals("2001:db8:aaaa:bbbb:cccc:0:0:1", 
DefaultHostnameVerifier.normaliseAddress("[2001:0db8:aaaa:bbbb:cccc:0:0:0001]"));
Assert.assertEquals("2001:db8:aaaa:bbbb:cccc:0:0:1", 
DefaultHostnameVerifier.normaliseAddress("[2001:0db8:aaaa:bbbb:cccc::1]"));
{code}
 
Please provide a test case demostrating the defect. Otherwise I will have to 
close the issue as invalid.

Oleg
 

> IPV6 Pattern matching fails if IPv6 address enclosed in square brackets
> -----------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-2158
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2158
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient (classic)
>            Reporter: Babu Reddy
>            Priority: Major
>
> InetAddressUtils.isIPv6Address method always returns false if IPV6 host 
> address enclosed in square brackets is passed to this method as a parameter. 
> Due to this Host name verification is failing.
>  
> Reference: HTTPCLIENT-1698
>  
> Ex [https://[2001:db8::2:1]:443/example|https://[2001:db8::2:1]/example], 
> IPV6 host = [[2001:db8::2:1]|https://[2001:db8::2:1]/example]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to