zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #04459
[Merge] lp:~zorba-coders/zorba/bug925816 into lp:zorba
Rodolfo Ochoa has proposed merging lp:~zorba-coders/zorba/bug925816 into lp:zorba.
Requested reviews:
Matthias Brantner (matthias-brantner)
Cezar Andrei (cezar-andrei)
Rodolfo Ochoa (rodolfo-ochoa)
Related bugs:
Bug #925816 in Zorba: "URI resolver doesn't support Java URI format"
https://bugs.launchpad.net/zorba/+bug/925816
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug925816/+merge/91382
Added recognition for URIs without authority, this is a JAVA URI case.
--
https://code.launchpad.net/~zorba-coders/zorba/bug925816/+merge/91382
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/zorbatypes/URI.cpp'
--- src/zorbatypes/URI.cpp 2011-12-21 14:40:33 +0000
+++ src/zorbatypes/URI.cpp 2012-02-03 01:31:20 +0000
@@ -99,6 +99,18 @@
zstring tmp(uri.c_str() + 8);
uri::decode(tmp, &filepath);
}
+ else if (uri.compare(0, 6, "file:/") == 0 && //JAVA Exception for File URIs without Authority
+ ((uri.compare(7, 1, ":") == 0) || (uri.compare(7, 4, "%3A/") == 0)))
+ {
+ zstring tmp(uri.c_str() + 6);
+ uri::decode(tmp, &filepath);
+ }
+ else if (uri.compare(0, 17, "file://localhost/") == 0 &&
+ ((uri.compare(18, 1, ":") == 0) || (uri.compare(18, 4, "%3A/") == 0)))
+ {
+ zstring tmp(uri.c_str() + 17);
+ uri::decode(tmp, &filepath);
+ }
else
#endif
if (uri.compare(0, 8, "file:///") == 0)
@@ -621,9 +633,13 @@
* Authority
* two slashes means generic URI syntax, so we get the authority
*/
- if (lTrimmedURI.compare(lIndex, 2, "//") == 0)
+ if ( (lTrimmedURI.compare(lIndex, 2, "//") == 0) ||
+ // allow JAVA FILE constructs without authority, i.e.: file:/D:/myFile
+ (ZSTREQ(theScheme, "file") && (lTrimmedURI.compare(lIndex, 1, "/") == 0)))
{
- lIndex += 2;
+ if ((lTrimmedURI.compare(lIndex, 2, "//") == 0)) {
+ lIndex += 2;
+ }
if (lIndex >= lTrimmedURILength)
{
throw XQUERY_EXCEPTION(
Follow ups
-
[Merge] lp:~zorba-coders/zorba/bug925816 into lp:zorba
From: noreply, 2012-02-06
-
[Merge] lp:~zorba-coders/zorba/bug925816 into lp:zorba
From: Zorba Build Bot, 2012-02-06
-
[Merge] lp:~zorba-coders/zorba/bug925816 into lp:zorba
From: Zorba Build Bot, 2012-02-06
-
[Merge] lp:~zorba-coders/zorba/bug925816 into lp:zorba
From: Rodolfo Ochoa, 2012-02-06
-
[Merge] lp:~zorba-coders/zorba/bug925816 into lp:zorba
From: Zorba Build Bot, 2012-02-05
-
Re: [Merge] lp:~zorba-coders/zorba/bug925816 into lp:zorba
From: Zorba Build Bot, 2012-02-05
-
[Merge] lp:~zorba-coders/zorba/bug925816 into lp:zorba
From: Zorba Build Bot, 2012-02-05
-
[Merge] lp:~zorba-coders/zorba/bug925816 into lp:zorba
From: Rodolfo Ochoa, 2012-02-05
-
Re: [Merge] lp:~zorba-coders/zorba/bug925816 into lp:zorba
From: Rodolfo Ochoa, 2012-02-05
-
[Merge] lp:~zorba-coders/zorba/bug925816 into lp:zorba
From: Zorba Build Bot, 2012-02-04
-
Re: [Merge] lp:~zorba-coders/zorba/bug925816 into lp:zorba
From: Zorba Build Bot, 2012-02-04
-
[Merge] lp:~zorba-coders/zorba/bug925816 into lp:zorba
From: Zorba Build Bot, 2012-02-04
-
[Merge] lp:~zorba-coders/zorba/bug925816 into lp:zorba
From: Matthias Brantner, 2012-02-04
-
[Merge] lp:~zorba-coders/zorba/bug925816 into lp:zorba
From: Matthias Brantner, 2012-02-04
-
Re: [Merge] lp:~zorba-coders/zorba/bug925816 into lp:zorba
From: Cezar Andrei, 2012-02-03