Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix bug of PROPFIND #91

Merged
merged 1 commit into from

3 participants

@johnsonlee

when request an empty folder with depth 0, it isn't supposed to be responded with any children.

@mikedeboer
Owner

Alright, this actually seems reasonable to me :) Thanks and apologies for it taking so long for me to respond!

@mikedeboer mikedeboer merged commit 7f826b7 into from
@aenario

@johnsonlee, with this change, requests such as :

PROPFIND /public/calendars/me/my-calendar/
DEPTH 1
<?xml version="1.0" encoding="UTF-8"?>
<propfind xmlns="DAV:">
       <prop>
           <CS:getctag xmlns:CS="http://calendarserver.org/ns/"/>
           <getetag/>
      </prop>
</propfind>

do not return the parent (Calendar ~ Collection) element properties. Was this the behaviour you were looking for ? This breaks compatibility with some caldav clients.

@mikedeboer
Owner

@aenario so it's prolly better to back this change out for now?

@aenario

I think so, full revert is in #99 but i guess the correct way to go is somewhere in between that solve @johnsonlee situation without breaking others

@johnsonlee
@dkm dkm referenced this pull request in bitfireAT/davdroid
Closed

Problem syncing with Cozy #260

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 26, 2013
  1. @johnsonlee

    Fix bug of PROPFIND, when request an empty folder with depth 0, it is…

    johnsonlee authored
    …n't supposed to be responded with any children
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/DAV/handler.js
View
4 lib/DAV/handler.js
@@ -1721,8 +1721,6 @@ jsDAV_Handler.STATUS_MAP = {
var nodes = {};
var nodesPath = [];
- nodes[path] = parentNode;
- nodesPath.push(path);
//if (jsDAV.debugMode)
// console.log("getPropertiesForPath", depth, parentNode,parentNode.hasFeature(jsDAV_iCollection));
@@ -1738,6 +1736,8 @@ jsDAV_Handler.STATUS_MAP = {
});
}
else {
+ nodes[path] = parentNode;
+ nodesPath.push(path);
afterGetChildren(nodes, nodesPath);
}
Something went wrong with that request. Please try again.