Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove status on REPORT #264

Closed

Conversation

tobiasKaminsky
Copy link
Member

Solves: nextcloud/server#15029

It seems that status is not allowed on top level, but only in prop/allprop.

Before:

<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
    <d:response>
        <d:status>HTTP/1.1 200 OK</d:status>
        <d:href>/nc/remote.php/dav/files/test/testFolder</d:href>
        <d:propstat>
            <d:prop>
                <oc:owner-id>test</oc:owner-id>
                <d:getetag>&quot;5cad995a5281a&quot;</d:getetag>
                <oc:permissions>RGDNVCK</oc:permissions>
                <d:getlastmodified>Wed, 10 Apr 2019 07:20:58 GMT</d:getlastmodified>
                <oc:id>00080126ocjycgrudn78</oc:id>
                <oc:favorite>1</oc:favorite>
                <nc:mount-type></nc:mount-type>
                <nc:note></nc:note>
                <nc:has-preview>false</nc:has-preview>
                <oc:size>0</oc:size>
                <nc:is-encrypted>0</nc:is-encrypted>
                <oc:owner-display-name>test</oc:owner-display-name>
                <oc:comments-unread>0</oc:comments-unread>
            </d:prop>
            <d:status>HTTP/1.1 200 OK</d:status>
        </d:propstat>
        <d:propstat>
            <d:prop>
                <d:creationdate/>
                <d:getcontentlength/>
                <d:getcontenttype/>
            </d:prop>
            <d:status>HTTP/1.1 404 Not Found</d:status>
        </d:propstat>
    </d:response>
</d:multistatus>

After:

<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
    <d:response>
        <d:href>/nc/remote.php/dav/files/test/testFolder</d:href>
        <d:propstat>
            <d:prop>
                <oc:owner-id>test</oc:owner-id>
                <d:getetag>&quot;5cad995a5281a&quot;</d:getetag>
                <oc:permissions>RGDNVCK</oc:permissions>
                <d:getlastmodified>Wed, 10 Apr 2019 07:20:58 GMT</d:getlastmodified>
                <oc:id>00080126ocjycgrudn78</oc:id>
                <oc:favorite>1</oc:favorite>
                <nc:mount-type></nc:mount-type>
                <nc:note></nc:note>
                <nc:has-preview>false</nc:has-preview>
                <oc:size>0</oc:size>
                <nc:is-encrypted>0</nc:is-encrypted>
                <oc:owner-display-name>test</oc:owner-display-name>
                <oc:comments-unread>0</oc:comments-unread>
            </d:prop>
            <d:status>HTTP/1.1 200 OK</d:status>
        </d:propstat>
        <d:propstat>
            <d:prop>
                <d:creationdate/>
                <d:getcontentlength/>
                <d:getcontenttype/>
            </d:prop>
            <d:status>HTTP/1.1 404 Not Found</d:status>
        </d:propstat>
    </d:response>
</d:multistatus>

As you can see we still have <d:status>…</d:status>, but only with in propstat.

Signed-off-by: tobiasKaminsky tobias@kaminsky.me

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
@MorrisJobke
Copy link
Member

🙈 You are patching a library. Maybe this should be fixed upstream as well. cc @rullzer

@tobiasKaminsky
Copy link
Member Author

Didn't knew this.
To be honest, I am not that sure if this is in line with RFC. I read about REPORT on RCF (https://tools.ietf.org/html/rfc3253#section-3.6) but there is nothing about status.
OTOH we do no have this in PROPFIND.

@MorrisJobke
Copy link
Member

To be honest, I am not that sure if this is in line with RFC.

That's why this repo is called 3rdparty 😉

@tobiasKaminsky
Copy link
Member Author

To be honest, I am not that sure if this is in line with RFC.

That's why this repo is called 3rdparty

Do you have any suggestion/idea how to fix this?

@tobiasKaminsky
Copy link
Member Author

@MorrisJobke if we cannot/ do not want to change on server side, I unfortunately do not have any idea how to fix this…

@MorrisJobke
Copy link
Member

@rullzer Do you want to bring this upstream?

@kesselb
Copy link
Contributor

kesselb commented Sep 23, 2019

@rullzer 🏓

@tobiasKaminsky
Copy link
Member Author

@rullzer ping? :-)

If we do not want to change this, I'll have a look how our new dav library handles this.

@rullzer
Copy link
Member

rullzer commented Oct 16, 2019

We should fix it upstream.

@tobiasKaminsky
Copy link
Member Author

Can you point me out where I can do this? Or do you want take care of it? ;-)

@rullzer
Copy link
Member

rullzer commented Oct 16, 2019

@tobiasKaminsky
Copy link
Member Author

Hm. This seems to work now, so closing, but I came across: nextcloud/server#17586

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.

4 participants