Problem with Webdav response

Nextcloud version (eg, 10.0.2): 12.0.0
Operating system and version (eg, Ubuntu 16.04): Ubuntu 16.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.18-2ubuntu3.2
PHP version (eg, 5.6): 7.0.18-0ubuntu0.16.04.1
Is this the first time you’ve seen this error?: yes

Can you reliably replicate it? (If so, please outline steps): Connect With Documents ios app and try to sync a directory

The issue you are facing:

I don’t know if it is a bug from nextcloud or the ios app, but When I download a folder with this program, all the files in subfolders download as a folder

Seeing the debug information of this app, This is what I found

INFO  [2017-06-27 22:57:19.250] [0x1754682c0] [rd.network.webdav.ls_parser] - responseStruct: (
        {
        collection = 1;
        creationdate = "";
        href = "/s1/remote.php/webdav/Backup/Documents/";
        lastmodified = "Wed, 28 Jun 2017 01:56:46 GMT";
    },
        {
        contentlength = 673724;
        creationdate = "";
        href = "/s1/remote.php/webdav/Backup/Documents/79173S_Instructor_Manual_bm.pdf";
        lastmodified = "Wed, 28 Jun 2017 01:55:21 GMT";
    },
        {
        collection = 1;
        creationdate = "";
        href = "/s1/remote.php/webdav/Backup/Documents/A/";
        lastmodified = "Wed, 28 Jun 2017 00:13:04 GMT";
    },
        {
        collection = 1;
        contentlength = 283673;
        creationdate = "";
        href = "/s1/remote.php/webdav/Backup/Documents/A/218%20-%20PLANO%20MATTIOLI%20ME18ENI.pdf";
        lastmodified = "Wed, 28 Jun 2017 00:13:04 GMT";
    },
        {
        collection = 1;
        contentlength = 443872;
        creationdate = "";
        href = "/s1/remote.php/webdav/Backup/Documents/A/253%20-%20PLANO%20R.MATTIOLI%20ME15BLA.pdf";
        lastmodified = "Wed, 28 Jun 2017 00:13:04 GMT";
    },
....

See the enclosing part for file “/s1/remote.php/webdav/Backup/Documents/A/218%20-%20PLANO%20MATTIOLI%20ME18ENI.pdf”. This is a file, who has a “contentlength” but is also marked as collection! (collection = 1) then, I think the webdav client implementacion see it as a folder.

If i see the webdav from another client (linux for example) it’s ok.

Also, I’ve try to do the very same but with owncloud. All is ok!. This is the log of owncloud. The only difference is I can’t see the “collection = 1”

INFO  [2017-06-27 23:41:15.471] [0x170a66280] [rd.network.webdav.ls_parser] - responseStruct: (
        {
        collection = 1;
        creationdate = "";
        href = "/s2/remote.php/webdav/Backup/Documents/";
        lastmodified = "Wed, 28 Jun 2017 02:41:09 GMT";
    },
        {
        contentlength = 673724;
        creationdate = "";
        href = "/s2/remote.php/webdav/Backup/Documents/79173S_Instructor_Manual_bm.pdf";
        lastmodified = "Wed, 28 Jun 2017 01:55:21 GMT";
    },
        {
        collection = 1;
        creationdate = "";
        href = "/s2/remote.php/webdav/Backup/Documents/A/";
        lastmodified = "Wed, 28 Jun 2017 02:37:35 GMT";
    },
        {
        contentlength = 283673;
        creationdate = "";
        href = "/s2/remote.php/webdav/Backup/Documents/A/218%20-%20PLANO%20MATTIOLI%20ME18ENI.pdf";
        lastmodified = "Mon, 26 Jun 2017 03:54:29 GMT";
    },
        {
        contentlength = 443872;
        creationdate = "";
        href = "/s2/remote.php/webdav/Backup/Documents/A/253%20-%20PLANO%20R.MATTIOLI%20ME15BLA.pdf";
        lastmodified = "Mon, 26 Jun 2017 03:54:32 GMT";
    },
…..

Thanks for the help!