Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AFC51200BE8 for ; Thu, 8 Dec 2016 19:17:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id AE5FD160B27; Thu, 8 Dec 2016 18:17:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 152A7160B30 for ; Thu, 8 Dec 2016 19:16:59 +0100 (CET) Received: (qmail 37457 invoked by uid 500); 8 Dec 2016 18:16:59 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 37190 invoked by uid 99); 8 Dec 2016 18:16:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Dec 2016 18:16:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id B35922C03E6 for ; Thu, 8 Dec 2016 18:16:58 +0000 (UTC) Date: Thu, 8 Dec 2016 18:16:58 +0000 (UTC) From: "Andreas Wundsam (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HTTPCLIENT-1795) Http Client does not support RFC-compliant quoted IPv6 Link-Local host literals MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 08 Dec 2016 18:17:00 -0000 Andreas Wundsam created HTTPCLIENT-1795: ------------------------------------------- Summary: Http Client does not support RFC-compliant quoted IPv6 Link-Local host literals Key: HTTPCLIENT-1795 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1795 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpClient (async) Affects Versions: 4.5.2 Reporter: Andreas Wundsam [RFC 6874|https://tools.ietf.org/html/rfc6874] states that, when constructing a URL with an LLv6 literal, the {{%}} sign that prefixes the ZoneID must be quoted as {{%25}}. (Formally, this is specified in ). httpclient does not seem to supported version. Example: {code} Request.Get("http://[fe80::221:b7ff:fe8a:57d5%25en4]/") .connectTimeout(1000) .socketTimeout(1000) .execute().returnContent().asString(); {code} results in {noformat} java.net.UnknownHostException: no such interface 25en4 at java.net.Inet6Address.initstr(Inet6Address.java:487) at java.net.Inet6Address.(Inet6Address.java:408) at java.net.InetAddress.getAllByName(InetAddress.java:1181) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55) at org.apache.http.client.fluent.Request.internalExecute(Request.java:173) at org.apache.http.client.fluent.Request.execute(Request.java:177) at Test.name(Test.java:12) [...] {noformat} It appears that httpclient directly passes the host literal {{[fe80::221:b7ff:fe8a:57d5%25en4]}} to the Java standard method {{InetAddress.getAllByName(host)}}, which does not support the URL quoting that RFC 6874 prescribes. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org