Skip to content
Snippets Groups Projects
Commit 31003b47 authored by Bart Visscher's avatar Bart Visscher
Browse files

Decode the alternative path_info

parent 7d20e98a
Branches
No related tags found
No related merge requests found
......@@ -61,6 +61,17 @@ class OC_Request {
$path_info = $_SERVER['PATH_INFO'];
}else{
$path_info = substr($_SERVER['REQUEST_URI'], strlen($_SERVER['SCRIPT_NAME']));
// following is taken from Sabre_DAV_URLUtil::decodePathSegment
$path_info = rawurldecode($path_info);
$encoding = mb_detect_encoding($path_info, array('UTF-8','ISO-8859-1'));
switch($encoding) {
case 'ISO-8859-1' :
$path_info = utf8_encode($path_info);
}
// end copy
}
return $path_info;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment