Correct. Per RFC 6874, the % must be escaped as in: coap://[fe80::dafe:e3ff:fe00:ebfa%25wlan0]:49593 (where %25 is the hex encoded version of '%')
> -----Original Message----- > From: iotivity-dev-bounces at lists.iotivity.org [mailto:iotivity-dev- > bounces at lists.iotivity.org] On Behalf Of Thiago Macieira > Sent: Thursday, July 14, 2016 9:06 AM > To: iotivity-dev at lists.iotivity.org; jihun.ha at samsung.com > Subject: Re: [dev] OcResource->getHost() api gives a tricky host address in > Android > > On quinta-feira, 14 de julho de 2016 15:03:22 PDT ??? wrote: > > I'm trying to implement android sample application and found an > > unexpected information from OcResource java object. (Upon a resource > > is found in a given network, I can get a corresponding OcResource > > object in my Android sample application) OcResource has an "getHost()" > > API to get the found resource's address. > > However, it returns a tricky information like > > coap://[fe80::dafe:e3ff:fe00:ebfa%wlan0]:49593 > > Why is "wlan0" appended to IPv6 address? I tried this for IPv4 setting > > but I did not see such a string. > > Is there any person who knows this happening? > > Yes. That's an IPv6 scope ID, though the URL is invalid. The % is not > permitted > there, even under RFC 6874. > > There's a bug in the getHost() function. > > -- > Thiago Macieira - thiago.macieira (AT) intel.com > Software Architect - Intel Open Source Technology Center > > _______________________________________________ > iotivity-dev mailing list > iotivity-dev at lists.iotivity.org > https://lists.iotivity.org/mailman/listinfo/iotivity-dev
