Re: new URI("http://example.com/foo#bar").resolve("")

2010-03-09 Thread Jack Bates
get URI as follows. > >>> > >>>[...] > >>> > >>>"" = "http://a/b/c/d;p?q"; > >>> > >>> - however when I run, > >>> > >>> import java.net.URI; > >>&g

Re: new URI("http://example.com/foo#bar").resolve("")

2010-03-09 Thread Christopher Hegarty -Sun Microsystems Ireland
outputs, $ java Test http://a/b/c/ $ RFC3986 section 5.2.2 also includes, if (R.path == "") then T.path = Base.path; So, "foo#bar" is correctly discarded, leaving the new URI http://example.com/ That would be my reading of RFC2396 anyway.

Re: new URI("http://example.com/foo#bar").resolve("")

2010-03-09 Thread Jack Bates
args) throws Exception > > { > > System.out.println(new URI("http://a/b/c/d;p?q";).resolve("")); > > } > > } > > > > - instead of "http://a/b/c/d;p?q";, it outputs, > > > > $ java Test > > http://a/b/c/ >

Re: new URI("http://example.com/foo#bar").resolve("")

2010-01-26 Thread Jack Bates
m.out.println(new URI("http://a/b/c/d;p?q";).resolve("")); > > } > > } > > > > - instead of "http://a/b/c/d;p?q";, it outputs, > > > > $ java Test > > http://a/b/c/ > > $ > > > > RFC3986 section

Re: new URI("http://example.com/foo#bar").resolve("")

2010-01-26 Thread Michael McMahon
ng the new URI http://example.com/ That would be my reading of RFC2396 anyway. - Michael. Jack Bates wrote: new URI("http://example.com/foo#bar";).resolve("") ^ I expect this to return "http://example.com/foo";, but when I run, import java.net.URI;

Re: new URI("http://example.com/foo#bar").resolve("")

2010-01-26 Thread Michael McMahon
ple.com/ That would be my reading of RFC2396 anyway. - Michael. Jack Bates wrote: new URI("http://example.com/foo#bar";).resolve("") ^ I expect this to return "http://example.com/foo";, but when I run, import java.net.URI; public class Test { public static

Re: new URI("http://example.com/foo#bar").resolve("")

2010-01-25 Thread Jack Bates
uot;;, it outputs, $ java Test http://a/b/c/ $ RFC3986 section 5.2.2 also includes, if (R.path == "") then T.path = Base.path; > So, "foo#bar" is correctly discarded, leaving the new URI > > http://example.com/ > > That would be my reading o

Re: new URI("http://example.com/foo#bar").resolve("")

2010-01-25 Thread Michael McMahon
. - Michael. Jack Bates wrote: new URI("http://example.com/foo#bar";).resolve("") ^ I expect this to return "http://example.com/foo";, but when I run, import java.net.URI; public class Test { public static void main(String[] args) throws Exception { System.out

new URI("http://example.com/foo#bar").resolve("")

2010-01-23 Thread Jack Bates
new URI("http://example.com/foo#bar";).resolve("") ^ I expect this to return "http://example.com/foo";, but when I run, import java.net.URI; public class Test { public static void main(String[] args) throws Exception { System.out.println(new URI("ht