[evolution-data-server] EWebDAVSession: Relax requirement for full path existence in propstat response



commit 04c09ae860ed81064b8da3f6effafb0ef95f4e32
Author: Milan Crha <mcrha redhat com>
Date:   Fri Jun 26 12:56:16 2020 +0200

    EWebDAVSession: Relax requirement for full path existence in propstat response
    
    The server can return DAV:multistatus, without any DAV:response children,
    which is a valid response, thus do not claim an error when it happens.

 src/libedataserver/e-webdav-session.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/libedataserver/e-webdav-session.c b/src/libedataserver/e-webdav-session.c
index a8d07b9ed..f254a84fb 100644
--- a/src/libedataserver/e-webdav-session.c
+++ b/src/libedataserver/e-webdav-session.c
@@ -3191,9 +3191,6 @@ e_webdav_session_traverse_propstat_response (EWebDAVSession *webdav,
 
        top_node = e_xml_find_sibling (top_node, top_path_ns_href1, top_path_name1);
 
-       if (top_path_name2)
-               top_node = e_xml_find_child (top_node, top_path_ns_href2, top_path_name2);
-
        if (!top_node) {
                gchar *tmp;
 
@@ -3216,6 +3213,10 @@ e_webdav_session_traverse_propstat_response (EWebDAVSession *webdav,
                return FALSE;
        }
 
+       /* The server can return 'multistatus' with no 'response' children, which is not a problem */
+       if (top_path_name2)
+               top_node = e_xml_find_child (top_node, top_path_ns_href2, top_path_name2);
+
        for (node = top_node; node && !do_stop; node = xmlNextElementSibling (node)) {
                xmlNodePtr href_node = NULL, propstat_node = NULL;
                xmlNodePtr status_node = NULL, prop_node = NULL;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]