mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-07-28 13:09:24 +00:00
Use DeconstructURL rather than rawurldecode since it strips base_name components as well.
This commit is contained in:
parent
07bce5f8bd
commit
4f81556586
@ -412,7 +412,7 @@ EOSQL;
|
||||
if ( $this->collection_path == $this->path."/" ) {
|
||||
$this->path .= '/';
|
||||
dbg_error_log( "caldav", "Path is actually a collection - sending Content-Location header." );
|
||||
header( "Content-Loca3tion: ".ConstructURL($this->path) );
|
||||
header( "Content-Location: ".ConstructURL($this->path) );
|
||||
}
|
||||
if ( preg_match( '#^(/principals/[^/]+/[^/]+)/?$#', $this->path, $matches) ) {
|
||||
// Force a depth of 0 on these, which are at the wrong URL.
|
||||
|
||||
@ -1633,13 +1633,13 @@ EOQRY;
|
||||
$reply->DAVElement( $prop, 'owner', $reply->href( ConstructURL($this->collection->bound_from )) );
|
||||
}
|
||||
else {
|
||||
$reply->DAVElement( $prop, 'owner', $reply->href( ConstructURL(rawurldecode($this->principal_url())) ) );
|
||||
$reply->DAVElement( $prop, 'owner', $reply->href( ConstructURL(DeconstructURL($this->principal_url())) ) );
|
||||
}
|
||||
break;
|
||||
|
||||
case 'DAV::add-member':
|
||||
if ( ! $this->_is_collection ) return false;
|
||||
$reply->DAVElement( $prop, 'add-member', $reply->href(ConstructURL(rawurldecode($this->url())).'?add-member') );
|
||||
$reply->DAVElement( $prop, 'add-member', $reply->href(ConstructURL(DeconstructURL($this->url())).'?add-member') );
|
||||
break;
|
||||
|
||||
// Empty tag responses.
|
||||
@ -1742,7 +1742,7 @@ EOQRY;
|
||||
break;
|
||||
|
||||
case 'DAV::current-user-principal':
|
||||
$prop->NewElement('current-user-principal', $reply->href( ConstructURL(rawurldecode($request->principal->url())) ) );
|
||||
$prop->NewElement('current-user-principal', $reply->href( ConstructURL(DeconstructURL($request->principal->url())) ) );
|
||||
break;
|
||||
|
||||
case 'SOME-DENIED-PROPERTY': /** indicating the style for future expansion */
|
||||
|
||||
@ -487,7 +487,7 @@ class Principal {
|
||||
default:
|
||||
fatal('Unknown internal URL type "'.$type.'"');
|
||||
}
|
||||
return ConstructURL(rawurldecode($result));
|
||||
return ConstructURL(DeconstructURL($result));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user