mirror of
https://github.com/nextcloud/server.git
synced 2026-05-14 09:29:52 -04:00
Merge pull request #32236 from nextcloud/backport/31758/stable24
[stable24] Use sabre function directly rather than duplicating it
This commit is contained in:
commit
ee28bf89ba
2 changed files with 3 additions and 12 deletions
|
|
@ -2542,7 +2542,8 @@
|
|||
<RedundantCondition occurrences="1">
|
||||
<code>\is_array($params)</code>
|
||||
</RedundantCondition>
|
||||
<UndefinedFunction occurrences="1">
|
||||
<UndefinedFunction occurrences="2">
|
||||
<code>\Sabre\HTTP\decodePath($pathInfo)</code>
|
||||
<code>\Sabre\Uri\split($scriptName)</code>
|
||||
</UndefinedFunction>
|
||||
</file>
|
||||
|
|
|
|||
|
|
@ -784,17 +784,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
|
|||
*/
|
||||
public function getPathInfo() {
|
||||
$pathInfo = $this->getRawPathInfo();
|
||||
// following is taken from \Sabre\HTTP\URLUtil::decodePathSegment
|
||||
$pathInfo = rawurldecode($pathInfo);
|
||||
$encoding = mb_detect_encoding($pathInfo, ['UTF-8', 'ISO-8859-1']);
|
||||
|
||||
switch ($encoding) {
|
||||
case 'ISO-8859-1':
|
||||
$pathInfo = utf8_encode($pathInfo);
|
||||
}
|
||||
// end copy
|
||||
|
||||
return $pathInfo;
|
||||
return \Sabre\HTTP\decodePath($pathInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue