[e-lang] Note: CapTP URL code needs to be prepared for IPv6

Kevin Reid kpreid at mac.com
Wed Jan 27 18:07:16 PST 2010


Sample broken URL generated:

<captp://*dif7qgacp5at4ivzp4fn3ucghiaxdqn4@10.5.8.78: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/>






More information about the e-lang mailing list