Skip to content

Add omitted namespace - #5

Merged
smarcet merged 2 commits into
smarcet:masterfrom
infostreams:patch-5
Mar 3, 2018
Merged

Add omitted namespace#5
smarcet merged 2 commits into
smarcet:masterfrom
infostreams:patch-5

Conversation

@infostreams

Copy link
Copy Markdown
Contributor

In the GetCalendarRequest and GetCalendarsRequest you use the {http://calendarserver.org/ns/:} namespace, but that one was not declared at the top of the XML document.

It's a superficial change only, the old code returns the same results from the CalDav server as the new code. However, the generated XML from the old code is somewhat quaint:

<?xml version="1.0" encoding="UTF-8"?>
<D:propfind xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
   <D:prop>
      <D:displayname />
      <D:resourcetype />
      <D:sync-token />
      <D:getetag />
      <x1:getctag xmlns:x1="http://calendarserver.org/ns/:" />
   </D:prop>
</D:propfind>

The new code generates

<?xml version="1.0" encoding="UTF-8"?>
<D:propfind xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:CS="http://calendarserver.org/ns/:">
   <D:prop>
      <D:displayname />
      <D:resourcetype />
      <D:sync-token />
      <D:getetag />
      <CS:getctag />
   </D:prop>
</D:propfind>

In the GetCalendarRequest and GetCalendarsRequest you use the {http://calendarserver.org/ns/:} namespace, but that one was not declared at the top of the XML document.
Prevents SabreDAV from recognizing the request for a ctag
@smarcet
smarcet merged commit 416e54e into smarcet:master Mar 3, 2018
anvanvan pushed a commit to anvanvan/CalDAVClient that referenced this pull request Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants