diff --git a/inc/CalDAVRequest.php b/inc/CalDAVRequest.php index 77379145..c89fd96a 100644 --- a/inc/CalDAVRequest.php +++ b/inc/CalDAVRequest.php @@ -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. diff --git a/inc/DAVResource.php b/inc/DAVResource.php index 069f98b6..68d5273e 100644 --- a/inc/DAVResource.php +++ b/inc/DAVResource.php @@ -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 */ diff --git a/inc/Principal.php b/inc/Principal.php index e46e94df..fabc328b 100644 --- a/inc/Principal.php +++ b/inc/Principal.php @@ -487,7 +487,7 @@ class Principal { default: fatal('Unknown internal URL type "'.$type.'"'); } - return ConstructURL(rawurldecode($result)); + return ConstructURL(DeconstructURL($result)); }