hg: jdk8/tl/jdk: 7079145: Remove java/net/ipv6tests/UdpTest.java from the ProblemList.txt

2013-10-25 Thread chris . hegarty
Changeset: d126301ad372
Author:ewang
Date:  2013-10-25 11:01 +0100
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/d126301ad372

7079145: Remove java/net/ipv6tests/UdpTest.java from the ProblemList.txt
Reviewed-by: alanb, chegar

! test/ProblemList.txt



Re: HttpURLConnection with IPv6 link-local address

2013-10-25 Thread Chris Hegarty

Hi Bruno,

Wow, I've been working in this area for more than a decade, and this is 
the first bug I've seen on the HttpURLConnection when using URL's with 
literal IPv6 addresses.


That said, I think your points are valid. I created the following bug to 
track this issue:

  https://bugs.openjdk.java.net/browse/JDK-8027308

We just past ZBB [1] for JDK8, so I'm not sure that a fix for this issue 
will make JDK8 FCS, but I would suspect that the changes would be 
suitable for an Update release, 7uXX or 8uXX for example.


-Chris.

[1] http://openjdk.java.net/projects/jdk8/milestones#Zero_Bug_Bounce

On 25/10/2013 02:38, Bruno Harbulot wrote:

Hello,

I've been trying to use HttpURLConnection to connect to a web server
using its IPv6 link-local address.

There are two issues with this:

- HttpURLConnection work with URLs with the official % syntax (only the
informal one) for the scope ID (normally required for link-local addresses).

   Indeed, http://[fe80::a00:27ff::%eth0]/ (for example) can be
used to send a request, but http://[fe80::a00:27ff::%25eth0]/
will not send a request at all ("java.net.SocketException: Network is
unreachable...").
   The difference is in the encoding of % (which separates the actual IP
address from the scope ID).
   RFC 6874 (Section 2) says, "According to URI syntax [RFC3986], "%" is
always treated as an escape character in a URI, so, according to the
established URI syntax [RFC3986] any occurrences of literal "%" symbols
in a URI MUST be percent-encoded and represented in the form "%25"."

- HttpURLConnection sends the scope ID in the Host header, i.e. "Host:
[fe80::a00:27ff::%eth0]" instead of "Host:
[fe80::a00:27ff::]".

   Unfortunately, this doesn't seem to be allowed by RFC 4007, and this
causes Apache Httpd to return a 400 error status.
   (There are more details in this Apache Httpd issue:
https://issues.apache.org/bugzilla/show_bug.cgi?id=35122#c4 )

   The only workaround I've found was to set the Host header manually,
but this also requires enabling "sun.net.http.allowRestrictedHeaders".


These problems are present in the latest Java 7 release and in the Java
8 early release.

I'm not sure if this has already been reported or discussed. If not,
would it be possible to address it in future releases?

Best wishes,

Bruno.


Re: HttpURLConnection with IPv6 link-local address

2013-10-25 Thread Bernd Eckenfels

Am 25.10.2013, 16:44 Uhr, schrieb Chris Hegarty :
Wow, I've been working in this area for more than a decade, and this is  
the first bug I've seen on the HttpURLConnection when using URL's with  
literal IPv6 addresses.


I guess the interface identifier is just so inherently system specific  
that it most often not make sense to be used in URLs. But there is I guess  
one exception where it is used for local network stuff related to  
Plug&Play, Zeroconf and other home-stuff.


We just past ZBB [1] for JDK8, so I'm not sure that a fix for this issue  
will make JDK8 FCS, but I would suspect that the changes would be  
suitable for an Update release, 7uXX or 8uXX for example.


I guess it especially would be helpfull if there is an actual commonly  
used usecase. Thats why I am wondering whats the motivation for the  
reporter.


Gruss
Bernd
--
http://bernd.eckenfels.net


hg: jdk8/tl/jdk: 5063500: Formatter spec says "char" is not an integral type; ...

2013-10-25 Thread stuart . marks
Changeset: 8ea272253285
Author:smarks
Date:  2013-10-25 14:53 -0700
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/8ea272253285

5063500: Formatter spec says "char" is not an integral type
7126305: Wrong Unicode value specified for format conversion character 'd'
8027287: incorrect example in Formatter javadoc
Reviewed-by: rriggs, darcy, lancea

! src/share/classes/java/util/Formatter.java



Re: HttpURLConnection with IPv6 link-local address

2013-10-25 Thread Bruno Harbulot
Yes, the use-case I had in mind is indeed for automatic configuration, to
be able to communicate with a machine connected via ethernet without
necessarily knowing its current IP configuration (and without requiring a
DHCP server which it may or may not be configured to use). Unlike
link-local IPv4 addresses allocated via IPv4LL, there is always a
link-local IPv6 address (IPv4LL addresses are removed as soon as a "proper"
IPv4 address is configured on the same NIC, even if it's on an alias
interface on Linux, for example). When this is combined with a discovery
mechanism like mDNS, it's possible to find out the remote machine's
link-local IP address.

Having all this, it's possible to communicate with an HTTP server running
on the remote machine without any manual configuration, whether or not the
machine is correctly configured for your LAN.

Best wishes,

Bruno.


On Fri, Oct 25, 2013 at 10:36 PM, Bernd Eckenfels
wrote:

> Am 25.10.2013, 16:44 Uhr, schrieb Chris Hegarty  >:
>
>  Wow, I've been working in this area for more than a decade, and this is
>> the first bug I've seen on the HttpURLConnection when using URL's with
>> literal IPv6 addresses.
>>
>
> I guess the interface identifier is just so inherently system specific
> that it most often not make sense to be used in URLs. But there is I guess
> one exception where it is used for local network stuff related to
> Plug&Play, Zeroconf and other home-stuff.
>
>
>  We just past ZBB [1] for JDK8, so I'm not sure that a fix for this issue
>> will make JDK8 FCS, but I would suspect that the changes would be suitable
>> for an Update release, 7uXX or 8uXX for example.
>>
>
> I guess it especially would be helpfull if there is an actual commonly
> used usecase. Thats why I am wondering whats the motivation for the
> reporter.
>
> Gruss
> Bernd
> --
> http://bernd.eckenfels.net
>