8251155: HostIdentifier fails to canonicalize hostnames starting with digits(Internet mail)
serguei.spitsyn at oracle.com
serguei.spitsyn at oracle.com
Mon Aug 24 16:47:51 UTC 2020
Thank you for the comment, Claes!
Serguei
On 8/18/20 21:51, Claes Redestad wrote:
> Hi,
>
> not sure I do, but a quick read of the relevant RFC suggests that since
> a URI scheme (protocol) must start with a letter[1] it seems safe to
> assume the string must be of the form hostname or hostname:port if the
> first character in the string is a digit.
>
> /Claes
>
> [1] https://tools.ietf.org/html/rfc3986#section-3.1
>
> On 2020-08-18 22:03, serguei.spitsyn at oracle.com wrote:
>> Hi Jie,
>>
>> I've added Claes to the list as he may have an expertise in this area.
>>
>> 83 * <ul>
>> 84 * <li>{@code <null>} - transformed into "//localhost"</li>
>> 85 * <li>localhost - transformed into "//localhost"</li>
>> 86 * <li>hostname - transformed into "//hostname"</li>
>> 87 * <li>hostname:port - transformed into "//hostname:port"</li>
>> 88 * <li>proto:hostname - transformed into "proto://hostname"</li>
>> 89 * <li>proto:hostname:port - transformed into
>> 90 * "proto://hostname:port"</li>
>> 91 * <li>proto://hostname:port</li>
>> 92 * </ul>
>>
>> Is it worth to add an example to the list above?
>>
>> I wander if this fix needs a CSR.
>> How did you check this fix does not introduce any regressions?
>>
>> Thanks,
>> Serguei
>>
>>
>> On 8/17/20 08:13, jiefu(傅杰) wrote:
>>>
>>> Ping…
>>>
>>> Any comments?
>>>
>>> Thanks.
>>>
>>> Best regards,
>>>
>>> Jie
>>>
>>> *From: *serviceability-dev
>>> <serviceability-dev-retn at openjdk.java.net> on behalf of "jiefu(傅杰)"
>>> <jiefu at tencent.com>
>>> *Date: *Friday, August 7, 2020 at 7:44 AM
>>> *To: *"serviceability-dev at openjdk.java.net"
>>> <serviceability-dev at openjdk.java.net>
>>> *Subject: *Re: RFR: 8251155: HostIdentifier fails to canonicalize
>>> hostnames starting with digits(Internet mail)
>>>
>>> FYI:
>>>
>>> This bug will lead to failures of the following tests on machines
>>> with hostname starting from digits.
>>>
>>> - test/jdk/sun/tools/jstatd/TestJstatdExternalRegistry.java
>>>
>>> - test/jdk/sun/tools/jstatd/TestJstatdPort.java
>>>
>>> - test/jdk/sun/tools/jstatd/TestJstatdPortAndServer.java
>>>
>>> - test/jdk/sun/tools/jstatd/TestJstatdRmiPort.java
>>>
>>> So it's worth fixing it.
>>>
>>> Testing:
>>>
>>> - tier1-3 on Linux/x64
>>>
>>> Thanks.
>>>
>>> Best regards,
>>>
>>> Jie
>>>
>>> *From: *"jiefu(傅杰)" <jiefu at tencent.com>
>>> *Date: *Wednesday, August 5, 2020 at 3:19 PM
>>> *To: *"serviceability-dev at openjdk.java.net"
>>> <serviceability-dev at openjdk.java.net>
>>> *Subject: *RFR: 8251155: HostIdentifier fails to canonicalize
>>> hostnames starting with digits
>>>
>>> Hi all,
>>>
>>> JBS: https://bugs.openjdk.java.net/browse/JDK-8251155
>>>
>>> Webrev: http://cr.openjdk.java.net/~jiefu/8251155/webrev.00/
>>>
>>> HostIdentifier fails to canonicalize hostname:port if the hostname
>>> starts with digits.
>>>
>>> The current implementation will get "scheme = hostname".
>>>
>>> But the scheme should not be started with digits, which leads to
>>> this bug.
>>>
>>> Thanks a lot.
>>>
>>> Best regards,
>>>
>>> Jie
>>>
>>
More information about the serviceability-dev
mailing list