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 6BA34200D01 for ; Fri, 8 Sep 2017 00:53:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6A8301609C8; Thu, 7 Sep 2017 22:53:09 +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 B01121609BF for ; Fri, 8 Sep 2017 00:53:08 +0200 (CEST) Received: (qmail 32905 invoked by uid 500); 7 Sep 2017 22:53:06 -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 32894 invoked by uid 99); 7 Sep 2017 22:53:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Sep 2017 22:53:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 339CE18CFB1 for ; Thu, 7 Sep 2017 22:53:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.201 X-Spam-Level: X-Spam-Status: No, score=-99.201 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id madxQcl7n7WO for ; Thu, 7 Sep 2017 22:53:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 1A3B65F6BE for ; Thu, 7 Sep 2017 22:53:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 8645EE0E4F for ; Thu, 7 Sep 2017 22:53:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3CF0824153 for ; Thu, 7 Sep 2017 22:53:00 +0000 (UTC) Date: Thu, 7 Sep 2017 22:53:00 +0000 (UTC) From: "Markus Fischer (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (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, 07 Sep 2017 22:53:09 -0000 [ https://issues.apache.org/jira/browse/HTTPCLIENT-1795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16157812#comment-16157812 ] Markus Fischer commented on HTTPCLIENT-1795: -------------------------------------------- Maybe to be considered: could this break or conflict with ordinary URLs (e.g. query string part)? > 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 > Labels: stuck, volunteers-wanted > Fix For: Stuck > > > [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}}. E.g., the LLv6 address > {{fe80::221:b7ff:fe8a:57d5%en4}} should be specified as {{scheme://[fe80::221:b7ff:fe8a:57d5%25en4]/...}} in a URL. > httpclient does not seem to support quoted host literals: > 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.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org