Luis Rodriguez Gonzalez has proposed merging lp:~zorba-coders/zorba/bug-1015468
into lp:zorba.
Requested reviews:
Chris Hillery (ceejatec)
Related bugs:
Bug #1015468 in Zorba: "wrong uri resolution with fn:resolve-uri()"
https://bugs.launchpad.net/zorba/+bug/1015468
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1015468/+merge/161712
--
https://code.launchpad.net/~zorba-coders/zorba/bug-1015468/+merge/161712
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/unit_tests/test_uri.cpp'
--- src/unit_tests/test_uri.cpp 2013-02-07 17:24:36 +0000
+++ src/unit_tests/test_uri.cpp 2013-04-30 22:07:29 +0000
@@ -608,7 +608,21 @@
"",
"",
"localhost/Ångström/b/c" // path notation
- }
+ },
+ {
+ "file:///test.xml",
+ "#id",
+ "file:///test.xml#id",
+ "file",
+ 0,
+ "id",
+ "",
+ "",
+ "/test.xml",
+ "",
+ "",
+ "/test.xml"
+ }
}; // URITestEntry tests[]
=== modified file 'src/zorbatypes/URI.cpp'
--- src/zorbatypes/URI.cpp 2013-02-07 17:24:36 +0000
+++ src/zorbatypes/URI.cpp 2013-04-30 22:07:29 +0000
@@ -1279,7 +1279,7 @@
base_uri->get_path(path);
zstring::size_type last_slash = path.rfind("/");
- if ( last_slash != zstring::npos )
+ if ( last_slash != zstring::npos && (last_slash != 0) )
thePath = path.substr(0, last_slash+1);
else
thePath = path;
@@ -1287,7 +1287,8 @@
set_state(Path);
}
- if ( (! is_set(QueryString)) )
+ if ( !is_set(QueryString) && base_uri->is_set(QueryString) &&
+ !base_uri->get_encoded_query().empty() )
{
base_uri->get_query(theQueryString);
--
Mailing list: https://launchpad.net/~zorba-coders
Post to : [email protected]
Unsubscribe : https://launchpad.net/~zorba-coders
More help : https://help.launchpad.net/ListHelp