Merge lp:~zorba-coders/zorba/bug925816 into lp:zorba

Proposed by Rodolfo Ochoa
Status: Merged
Approved by: Rodolfo Ochoa
Approved revision: 10644
Merged at revision: 10645
Proposed branch: lp:~zorba-coders/zorba/bug925816
Merge into: lp:zorba
Diff against target: 38 lines (+18/-2)
1 file modified
src/zorbatypes/URI.cpp (+18/-2)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug925816
Reviewer Review Type Date Requested Status
Rodolfo Ochoa Approve
Cezar Andrei Approve
Matthias Brantner Pending
Review via email: mp+91382@code.launchpad.net

Commit message

Added recognition for URIs without authority, this is a JAVA URI case.

Description of the change

Added recognition for URIs without authority, this is a JAVA URI case.

To post a comment you must log in.
Revision history for this message
Cezar Andrei (cezar-andrei) wrote :

I think the URI code should allow even more broad constructs than this. Approving to get this going.

review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~zorba-coders/zorba/bug925816 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job bug925816-2012-02-04T01-51-57.631Z is finished. The
  final status was:

  3 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Rodolfo Ochoa (rodolfo-ochoa) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~zorba-coders/zorba/bug925816 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job bug925816-2012-02-05T04-03-52.902Z is finished. The
  final status was:

  3 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bug925816-2012-02-06T00-10-55.72Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/zorbatypes/URI.cpp'
2--- src/zorbatypes/URI.cpp 2011-12-21 14:40:33 +0000
3+++ src/zorbatypes/URI.cpp 2012-02-03 01:31:20 +0000
4@@ -99,6 +99,18 @@
5 zstring tmp(uri.c_str() + 8);
6 uri::decode(tmp, &filepath);
7 }
8+ else if (uri.compare(0, 6, "file:/") == 0 && //JAVA Exception for File URIs without Authority
9+ ((uri.compare(7, 1, ":") == 0) || (uri.compare(7, 4, "%3A/") == 0)))
10+ {
11+ zstring tmp(uri.c_str() + 6);
12+ uri::decode(tmp, &filepath);
13+ }
14+ else if (uri.compare(0, 17, "file://localhost/") == 0 &&
15+ ((uri.compare(18, 1, ":") == 0) || (uri.compare(18, 4, "%3A/") == 0)))
16+ {
17+ zstring tmp(uri.c_str() + 17);
18+ uri::decode(tmp, &filepath);
19+ }
20 else
21 #endif
22 if (uri.compare(0, 8, "file:///") == 0)
23@@ -621,9 +633,13 @@
24 * Authority
25 * two slashes means generic URI syntax, so we get the authority
26 */
27- if (lTrimmedURI.compare(lIndex, 2, "//") == 0)
28+ if ( (lTrimmedURI.compare(lIndex, 2, "//") == 0) ||
29+ // allow JAVA FILE constructs without authority, i.e.: file:/D:/myFile
30+ (ZSTREQ(theScheme, "file") && (lTrimmedURI.compare(lIndex, 1, "/") == 0)))
31 {
32- lIndex += 2;
33+ if ((lTrimmedURI.compare(lIndex, 2, "//") == 0)) {
34+ lIndex += 2;
35+ }
36 if (lIndex >= lTrimmedURILength)
37 {
38 throw XQUERY_EXCEPTION(

Subscribers

People subscribed via source and target branches