summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2017-05-21 00:44:49 +1000
committerStephan Bergmann <sbergman@redhat.com>2017-05-29 15:22:57 +0200
commit2220bdcbb7ba64c2ca34f8ffd8206c8a145140b6 (patch)
treed79198a40a6e1933603ed64af0618867dc430437
parentbd4aa1e09aa9fcedc381460e44bfc49a9f933786 (diff)
osl: qa test of %2F - for file URIs this is invalid
Change-Id: I3871355bb4556b408504ab70194885a2084ad80b Reviewed-on: https://gerrit.libreoffice.org/37859 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--sal/qa/osl/file/osl_File.cxx19
1 files changed, 16 insertions, 3 deletions
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 6b9613c6c652..a38bc3642c16 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -800,11 +800,24 @@ namespace osl_FileBase
void SystemPath_FileURL::getSystemPathFromFileURL_001_21()
{
-#if 0
+ /* From RFC3986, "2.2. Reserved Characters":
+
+ "The purpose of reserved characters is to provide a set of delimiting
+ characters that are distinguishable from other data within a URI.
+ URIs that differ in the replacement of a reserved character with its
+ corresponding percent-encoded octet are not equivalent. Percent-
+ encoding a reserved character, or decoding a percent-encoded octet
+ that corresponds to a reserved character, will change how the URI is
+ interpreted by most applications. Thus, characters in the reserved
+ set are protected from normalization and are therefore safe to be
+ used by scheme-specific and producer-specific algorithms for
+ delimiting data subcomponents within a URI."
+
+ In other words, %2F ("/") is NOT the same as /.
+ */
OString sURL("%2F");
- checkUNXBehaviour_getSystemPathFromFileURL(sURL, osl::FileBase::E_None, "/"); // LLA: this is may be a BUG
+ checkUNXBehaviour_getSystemPathFromFileURL(sURL, osl::FileBase::E_INVAL, "");
checkWNTBehaviour_getSystemPathFromFileURL(sURL, osl::FileBase::E_INVAL, "");
-#endif
}
void SystemPath_FileURL::getSystemPathFromFileURL_001_22()