apple / ccs-calendarserver

The Calendar and Contacts Server.
https://www.calendarserver.org
Apache License 2.0
486 stars 136 forks source link

principal-match REPORT vends two response XML elements instead of one #250

Closed macosforgebot closed 15 years ago

macosforgebot commented 15 years ago

@wsanchez originally submitted this as ticket:315


From Helge:

When requesting missing properties in a principal-match REPORT, iCal server returns two response XML elements with individual propstat's instead of one response element with two propstat's.

REPORT /calendars/users/nat/ 
Depth:0 

<?xml version="1.0" encoding="utf-8"?> 
<principal-match xmlns="DAV:" 
xmlns:I="urn:ietf:params:xml:ns:caldav" 
xmlns:C="urn:ietf:params:xml:ns:carddav" 
xmlns:G="http://groupdav.org/" 
xmlns:A="http://calendarserver.org/ns/" 
> 
<self/> 
<prop> 
<displayname/> 
<resourcetype/> 
... 
<A:first-name /> 
... 
---snap--- 

gives: 
---snip--- 
<?xml version='1.0' encoding='UTF-8'?> 
<multistatus xmlns='DAV:'> 
<response> 
<href>/principals/users/nat/</href> 
<propstat> 
<prop> 
<displayname>Nat!</displayname> 
<resourcetype> 
<collection/> 
<principal/> 
... 
</prop> 
<status>HTTP/1.1 200 OK</status> 
</propstat> 
</response> 
<response> 
<href>/principals/users/nat/</href> 
<propstat> 
<prop> 
<getctag xmlns='http://calendarserver.org/ns/'/> 
... 
</prop> 
<status>HTTP/1.1 404 Not Found</status> 
</propstat> 
</response> 
</multistatus> 
macosforgebot commented 15 years ago

@wsanchez originally submitted this as comment:1:⁠ticket:315


Cyrus notes:

Looks like a generic problem with report_common.responseForHref where it separate outs the good/bad propstats into separate davxml.PropertyStatusResponse elements. The normal PROPFIND behavior aggregates the good/bad propstats into one davxml.PropertyStatusResponse element.

macosforgebot commented 15 years ago

helge@… originally submitted this as comment:2:⁠ticket:315


Yes, as discussed with Cyrus, the DAV:expand-property REPORT shows the same issue.

macosforgebot commented 15 years ago

@m0rgen originally submitted this as comment:3:⁠ticket:315


Fixed in calendar server trunk, rev 3578

macosforgebot commented 15 years ago

@wsanchez originally submitted this as comment:4:⁠ticket:315


r3578