get URI as follows.
> >>>
> >>>[...]
> >>>
> >>>"" = "http://a/b/c/d;p?q";
> >>>
> >>> - however when I run,
> >>>
> >>> import java.net.URI;
> >>&g
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.
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/
>
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
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;
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
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
.
- 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("")
^ 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