Browse Source
Always transform the etag and read the data
Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/19901/head
Joas Schilling
6 years ago
committed by
Georg Ehrke
No known key found for this signature in database
GPG Key ID: 9D98FD9380A1CB43
2 changed files with
14 additions and
12 deletions
-
apps/dav/lib/CardDAV/CardDavBackend.php
-
apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
|
|
|
@ -994,6 +994,8 @@ class CardDavBackend implements BackendInterface, SyncSupport { |
|
|
|
$queryResult->closeCursor(); |
|
|
|
|
|
|
|
if (is_array($contact)) { |
|
|
|
$contact['etag'] = '"' . $contact['etag'] . '"'; |
|
|
|
$contact['carddata'] = $this->readBlob($contact['carddata']); |
|
|
|
$result = $contact; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -812,7 +812,7 @@ class CardDavBackendTest extends TestCase { |
|
|
|
$this->assertSame(0, (int)$result['addressbookid']); |
|
|
|
$this->assertSame('uri0', $result['uri']); |
|
|
|
$this->assertSame(5489543, (int)$result['lastmodified']); |
|
|
|
$this->assertSame('etag0', $result['etag']); |
|
|
|
$this->assertSame('"etag0"', $result['etag']); |
|
|
|
$this->assertSame(120, (int)$result['size']); |
|
|
|
|
|
|
|
// this shouldn't return any result because 'uri1' is in address book 1
|
|
|
|
|