Note: CapTP URL code needs to be prepared for IPv6

Kevin Reid <[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
Sample broken URL generated:

<captp://*dif7qgacp5at4ivzp4fn3ucghiaxdqn4-pQ5utlP+s9Ju2xs2qbjOVA@public.gmane.org:50903,fe80:0:0:0:223:6cff:fe81:d83e%6:50903/7dp7tu4orrtyb4yeeylz6ihmq73dbnqp 
 >

(In case you're wondering, if there were connectivity you would find  
that it dereferences to "x".)

The exception:

java.lang.NumberFormatException: For input string:  
"0:0:0:223:6cff:fe81:d83e%6:50746"
	at  
java 
.lang.NumberFormatException.forInputString(NumberFormatException.java: 
48)
	at java.lang.Integer.parseInt(Integer.java:458)
	at java.lang.Integer.parseInt(Integer.java:499)
	at net.vattp.data.DataPath.<init>(DataPath.java:355)
	at net.vattp.data.VatTPConnection.tryNextAddress(VatTPConnection.java: 
1212)
	at  
net.vattp.data.VatTPConnection.shutDownFinished(VatTPConnection.java: 
1018)
	at net.vattp.data.DataPath.shutDownFinished(DataPath.java:918)
	at net.vattp.data.DataCommThunk.run(DataCommThunk.java:199)
	at org.erights.e.elib.vat.PendingCall.innerRun(PendingCall.java:75)
	at org.erights.e.elib.vat.PendingEvent.run(PendingEvent.java:74)
	at org.erights.e.elib.vat.HeadlessRunner.run(HeadlessRunner.java:174)
	at java.lang.Thread.run(Thread.java:637)

The fix:

Per RFC 3986, the IPv6 address should be enclosed in square brackets  
(so as to distinguish the internal colons from the port number).

-- 
Kevin Reid                                  <http://switchb.org/kpreid/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.