From 2220bdcbb7ba64c2ca34f8ffd8206c8a145140b6 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Sun, 21 May 2017 00:44:49 +1000 Subject: osl: qa test of %2F - for file URIs this is invalid Change-Id: I3871355bb4556b408504ab70194885a2084ad80b Reviewed-on: https://gerrit.libreoffice.org/37859 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- sal/qa/osl/file/osl_File.cxx | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'sal/qa/osl') 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() -- cgit