ADDITIONAL SYSTEM INFORMATION :
Tested on win 10, java "Java(TM) SE Runtime Environment (build 22+36-2370)", I believe this is not OS specific issue.
A DESCRIPTION OF THE PROBLEM :
jwebserver.exe tool prints invalid URL in case local "::1" IPv6 is used for binding.
---
Command:
jwebserver.exe -b ::1
or
jwebserver.exe -b 0:0:0:0:0:0:0:1
Incorrect URL printed:
http://0:0:0:0:0:0:0:1:8000/
---
According to RFC 2732 it should be:
http://[0:0:0:0:0:0:0:1]:8000/
OR just
http://[::1]:8000/
=================================
The issue is the first URL is not recognized by browser (when pasted to address bar) as a valid URL which triggers to "search" action (i.e. Chrome).
====
full output:
====
c:\Program Files\Java\jdk-22\bin>java --version
java 22 2024-03-19
Java(TM) SE Runtime Environment (build 22+36-2370)
Java HotSpot(TM) 64-Bit Server VM (build 22+36-2370, mixed mode, sharing)
c:\Program Files\Java\jdk-22\bin>jwebserver.exe -b ::1
Serving c:\Program Files\Java\jdk-22\bin and subdirectories on 0:0:0:0:0:0:0:1 port 8000
URL http://0:0:0:0:0:0:0:1:8000/
c:\Program Files\Java\jdk-22\bin>jwebserver.exe -b 0:0:0:0:0:0:0:1
Serving c:\Program Files\Java\jdk-22\bin and subdirectories on 0:0:0:0:0:0:0:1 port 8000
URL http://0:0:0:0:0:0:0:1:8000/
Tested on win 10, java "Java(TM) SE Runtime Environment (build 22+36-2370)", I believe this is not OS specific issue.
A DESCRIPTION OF THE PROBLEM :
jwebserver.exe tool prints invalid URL in case local "::1" IPv6 is used for binding.
---
Command:
jwebserver.exe -b ::1
or
jwebserver.exe -b 0:0:0:0:0:0:0:1
Incorrect URL printed:
http://0:0:0:0:0:0:0:1:8000/
---
According to RFC 2732 it should be:
http://[0:0:0:0:0:0:0:1]:8000/
OR just
http://[::1]:8000/
=================================
The issue is the first URL is not recognized by browser (when pasted to address bar) as a valid URL which triggers to "search" action (i.e. Chrome).
====
full output:
====
c:\Program Files\Java\jdk-22\bin>java --version
java 22 2024-03-19
Java(TM) SE Runtime Environment (build 22+36-2370)
Java HotSpot(TM) 64-Bit Server VM (build 22+36-2370, mixed mode, sharing)
c:\Program Files\Java\jdk-22\bin>jwebserver.exe -b ::1
Serving c:\Program Files\Java\jdk-22\bin and subdirectories on 0:0:0:0:0:0:0:1 port 8000
URL http://0:0:0:0:0:0:0:1:8000/
c:\Program Files\Java\jdk-22\bin>jwebserver.exe -b 0:0:0:0:0:0:0:1
Serving c:\Program Files\Java\jdk-22\bin and subdirectories on 0:0:0:0:0:0:0:1 port 8000
URL http://0:0:0:0:0:0:0:1:8000/
- duplicates
-
JDK-8332097 jwebserver.exe tool prints invalid URL in case of IPv6 address binding
- Closed
- links to
-
Commit openjdk/jdk/f9a1d338
-
Review(master) openjdk/jdk/19173