mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-01 16:11:20 +00:00
Fix default URL for FindPrincipal() ensure If-Match etag is quoted.
This commit is contained in:
parent
200b3a08dd
commit
cfbb0bd6f3
@ -120,7 +120,7 @@ class CalDAVClient {
|
|||||||
* @param string $etag The etag to match / not match against.
|
* @param string $etag The etag to match / not match against.
|
||||||
*/
|
*/
|
||||||
function SetMatch( $match, $etag = '*' ) {
|
function SetMatch( $match, $etag = '*' ) {
|
||||||
$this->headers['match'] = sprintf( "%s-Match: %s", ($match ? "If" : "If-None"), $etag);
|
$this->headers['match'] = sprintf( "%s-Match: \"%s\"", ($match ? "If" : "If-None"), trim($etag,'"'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -599,7 +599,7 @@ class CalDAVClient {
|
|||||||
*
|
*
|
||||||
* @param string $url The URL to find the principal-URL from
|
* @param string $url The URL to find the principal-URL from
|
||||||
*/
|
*/
|
||||||
function FindPrincipal( $url ) {
|
function FindPrincipal( $url=null ) {
|
||||||
$xml = $this->DoPROPFINDRequest( $url, array('resourcetype', 'current-user-principal', 'owner', 'principal-URL',
|
$xml = $this->DoPROPFINDRequest( $url, array('resourcetype', 'current-user-principal', 'owner', 'principal-URL',
|
||||||
'urn:ietf:params:xml:ns:caldav:calendar-home-set'), 1);
|
'urn:ietf:params:xml:ns:caldav:calendar-home-set'), 1);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user