[Pkg-owncloud-commits] [php-sabredav] 11/23: Only special-casing ISO-8859-1

David Prévot taffit at moszumanska.debian.org
Sat Nov 30 15:44:01 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to tag version-1.0.12
in repository php-sabredav.

commit b3309d3e535040ddbbd9f6683c0cafe8548b4b9b
Author: Evert Pot <evert at rooftopsolutions.nl>
Date:   Mon Mar 29 17:38:37 2010 +0900

    Only special-casing ISO-8859-1
---
 lib/Sabre/DAV/URLUtil.php | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lib/Sabre/DAV/URLUtil.php b/lib/Sabre/DAV/URLUtil.php
index 94e21ce..b1b1bad 100644
--- a/lib/Sabre/DAV/URLUtil.php
+++ b/lib/Sabre/DAV/URLUtil.php
@@ -101,16 +101,15 @@ class Sabre_DAV_URLUtil {
 
         $path = urldecode($path);
         $encoding = mb_detect_encoding($path, array('UTF-8','ISO-8859-1'));
+
         switch($encoding) {
 
-            case 'UTF-8' : 
-                return $path;
             case 'ISO-8859-1' : 
-                return utf8_encode($path);
-            default : 
-                throw new Sabre_DAV_Exception_BadRequest('Invalid url encoding');
+                $path = utf8_encode($path);
         }
 
+        return $path;
+
     }
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git



More information about the Pkg-owncloud-commits mailing list