Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Bug in deresolve URI?
Bug in deresolve URI? [message #431084] Thu, 25 June 2009 23:22 Go to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0027_01C9F5CA.47B06030
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

URI a =3D URI.createURI("https://www.yahoo.com:80/index.html");
URI b =3D URI.createURI(https://www.google.com:80/index.jsp);
URI result =3D a.deresolve(b);

At this point, result is "//www.yahoo.com:80/index.html"
Is this intentional?

Pratik
------=_NextPart_000_0027_01C9F5CA.47B06030
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16850" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>URI a =3D URI.createURI("<A=20
href=3D"https://www.yahoo.com:80/index.html">https://www.yahoo.com:80/ind=
ex.html</A>");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>URI b =3D URI.createURI(<A=20
href=3D"https://www.google.com:80/index.jsp">https://www.google.com:80/in=
dex.jsp</A>);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>URI result =3D =
a.deresolve(b);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>At this point, result is "<FONT=20
size=3D2>//www.yahoo.com:80/index.html"</FONT></FONT></DIV >
<DIV><FONT face=3DArial size=3D2>Is this intentional?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Pratik</FONT></DIV></BODY></HTML>

------=_NextPart_000_0027_01C9F5CA.47B06030--
Re: Bug in deresolve URI? [message #431085 is a reply to message #431084] Thu, 25 June 2009 23:27 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_003A_01C9F5CB.0AA4ABA0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I just tried this with java.netURI#relativize() and it returned the =
absolute URI.
"Pratik Shah" <none@unknown.com> wrote in message =
news:h210rn$3b7$1@build.eclipse.org...
URI a =3D URI.createURI("https://www.yahoo.com:80/index.html");
URI b =3D URI.createURI(https://www.google.com:80/index.jsp);
URI result =3D a.deresolve(b);

At this point, result is "//www.yahoo.com:80/index.html"
Is this intentional?

Pratik
------=_NextPart_000_003A_01C9F5CB.0AA4ABA0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16850" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I just tried this with =
java.netURI#relativize() and=20
it returned the absolute URI.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Pratik Shah" &lt;<A=20
href=3D"mailto:none@unknown.com">none@unknown.com</A>&gt; wrote in =
message <A=20
=
href=3D"news:h210rn$3b7$1@build.eclipse.org">news:h210rn$3b7$1@build.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>URI a =3D URI.createURI("<A=20
=
href=3D"https://www.yahoo.com:80/index.html">https://www.yahoo.com:80/ind=
ex.html</A>");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>URI b =3D URI.createURI(<A=20
=
href=3D"https://www.google.com:80/index.jsp">https://www.google.com:80/in=
dex.jsp</A>);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>URI result =3D =
a.deresolve(b);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>At this point, result is "<FONT=20
size=3D2>//www.yahoo.com:80/index.html"</FONT></FONT></DIV >
<DIV><FONT face=3DArial size=3D2>Is this intentional?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>Pratik</FONT></DIV></BLOCKQUOTE></BODY></HTML >

------=_NextPart_000_003A_01C9F5CB.0AA4ABA0--
Re: Bug in deresolve URI? [message #431087 is a reply to message #431085] Fri, 26 June 2009 03:06 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30685
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------080807010703010602080803
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Pratik,

The specification is a little obtuse, so one might be tempted to
"correct" it, but yes, that's intentional. An important question is
whether resolve produces the original URI...

Pratik Shah wrote:
> I just tried this with java.netURI#relativize() and it returned the
> absolute URI.
>
> "Pratik Shah" <none@unknown.com <mailto:none@unknown.com>> wrote
> in message news:h210rn$3b7$1@build.eclipse.org...
> URI a = URI.createURI("https://www.yahoo.com:80/index.html");
> URI b = URI.createURI(https://www.google.com:80/index.jsp);
> URI result = a.deresolve(b);
>
> At this point, result is "//www.yahoo.com:80/index.html"
> Is this intentional?
>
> Pratik
>

--------------080807010703010602080803
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Pratik,<br>
<br>
The specification is a little obtuse, so one might be tempted to
"correct" it, but yes, that's intentional.&nbsp; An important question is
whether resolve produces the original URI...<br>
<br>
Pratik Shah wrote:
<blockquote cite="mid:h2115u$704$1@build.eclipse.org" type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta content="MSHTML 6.00.6000.16850" name="GENERATOR">
<style></style>
<div><font face="Arial" size="2">I just tried this with
java.netURI#relativize() and it returned the absolute URI.</font></div>
<blockquote dir="ltr"
style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div>"Pratik Shah" &lt;<a moz-do-not-send="true"
href="mailto:none@unknown.com">none@unknown.com</a>&gt; wrote in
message <a moz-do-not-send="true"
href="news:h210rn$3b7$1@build.eclipse.org">news:h210rn$3b7$1@build.eclipse.org</a>...</div>
<div><font face="Arial" size="2">URI a = URI.createURI("<a
moz-do-not-send="true" href="https://www.yahoo.com:80/index.html">https://www.yahoo.com:80/index.html</a>");</font></div>
<div><font face="Arial" size="2">URI b = URI.createURI(<a
moz-do-not-send="true" href="https://www.google.com:80/index.jsp">https://www.google.com:80/index.jsp</a>);</font></div>
<div><font face="Arial" size="2">URI result = a.deresolve(b);</font></div>
<div>&nbsp;</div>
<div><font face="Arial" size="2">At this point, result is "<font
size="2">//www.yahoo.com:80/index.html"</font></font></div >
<div><font face="Arial" size="2">Is this intentional?</font></div>
<div>&nbsp;</div>
<div><font face="Arial" size="2">Pratik</font></div>
</blockquote>
</blockquote>
</body>
</html>

--------------080807010703010602080803--
Previous Topic:[CDO] Listen to passive updates.
Next Topic:convert an instance/user model in ecore form
Goto Forum:
  


Current Time: Sat Dec 07 04:15:55 GMT 2019

Powered by FUDForum. Page generated in 0.02180 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top