net_path = "//" authority [ abs_path ]
abs_path = "/" path_segments
rel_path = rel_segment [ abs_path ]
Mike
On Saturday, January 25, 2003, at 12:25 PM, Oleg Kalnichevski wrote:
Sung-Gu
Please have a look at the following code snippet:
URI uri = new URI( "/yadayada/blabla" );
uri.getHost()); // produces null.
uri.getPath()); // produces '/yadayada/blabla'.
Everything is cool. However the following behavior appears a bit
illogical to me:
URI uri = new URI( "yadayada/blabla" );
uri.getHost()); // produces null. Should not it be 'yadayada'?
uri.getPath()); // produces 'host/path'. Should not it be '/blabla'?
I believe if uri is incomplete (no explicit protocol specified) and it
does not begin with / per default URI class constructor should assume
URI to begin with a host name followed by path, rather then a path with
host being null.
Is there a reason for current behavior of the URI class constructor?
Thanks
Oleg
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>