Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

DNS-SD & URISyntaxException: Bug or Feature?



Hello,

I'm trying to parse a Zeroconf's DNS Service Discovery URI in Java:

http://zap._http._tcp.local.:2080/

Unfortunately, java.net.URI chocks pretty badly on such host name:

java.net.URISyntaxException: Illegal character in hostname at index 11: http://zap._http._tcp.local:2080
at java.net.URI$Parser.fail(URI.java:2752)
at java.net.URI$Parser.parseHostname(URI.java:3271)
at java.net.URI$Parser.parseServer(URI.java:3120)
at java.net.URI$Parser.parseAuthority(URI.java:3051)
at java.net.URI$Parser.parseHierarchical(URI.java:3001)
at java.net.URI$Parser.parse(URI.java:2957)
at java.net.URI.<init>(URI.java:659)


As far as Java is concerned, is '_' (underscore) a valid domain's label or not? And if not, how does one parse a DNS-SD URI in Java?

Thanks in advance :)

Cheers,

PA.
_______________________________________________
rendezvous mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/rendezvous
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.