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

Nextcloud 15: no PUT Range support #8

Closed
abishai opened this issue Mar 16, 2019 · 11 comments
Closed

Nextcloud 15: no PUT Range support #8

abishai opened this issue Mar 16, 2019 · 11 comments

Comments

@abishai
Copy link

abishai commented Mar 16, 2019

It looks like SabreDav capabilities are not detected (or broken). I collected a trace, however I found nothing suspicious. Is it working for you ?

@miquels
Copy link
Owner

miquels commented Mar 19, 2019

I made a demo account on nextcloud.com, and did a webdav PROPFIND request:

$ curl -i --user "admin:admin" -X OPTIONS https://demo.nextcloud.com/ae8oobah/remote.php/dav/files/admin/
HTTP/1.1 200 OK
Date: Tue, 19 Mar 2019 13:00:23 GMT
Server: Apache
Allow: OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT
DAV: 1, 3, extended-mkcol, access-control, calendarserver-principal-property-search, nc-calendar-search, nc-enable-birthday-calendar
MS-Author-Via: DAV

The SabreDav PATCH specification says that sabredav-partialupdate needs to be advertised in the DAV: header. It isn't ... so, file a bug with nextcloud?

@abishai
Copy link
Author

abishai commented Mar 19, 2019

Good question! I missed that.
I'll take a look where it returns capabilities.

@abishai
Copy link
Author

abishai commented Mar 19, 2019

Updated: Issue #439. Lots of updates in PATCH support. The Sabre_DAV_PartialUpdate_IFile interface is now deprecated and will be removed in a future version.

Looks like Nextcloud uses PATCH method to do partial updates.

@miquels
Copy link
Owner

miquels commented Mar 19, 2019

Well, yes, that is the SabreDav standard, to use PATCH. In a specific way, see http://sabre.io/dav/http-patch/. However, if a server implements this, it must indicate that by putting sabredav-partialupdate in the DAV: header reply to an OPTION request.

@miquels
Copy link
Owner

miquels commented Mar 25, 2019

If there is no followup to this issue I will close it tomorrow.

@abishai
Copy link
Author

abishai commented Mar 25, 2019

Yep, it is not activated on Nextcloud side.

@miquels
Copy link
Owner

miquels commented Dec 5, 2019

Let's keep this issue open since the Nextcloud issue is also still open.

@muety
Copy link

muety commented Sep 16, 2021

Would it be an option to add a flag that instruct webdavfs to "forcefully" assume the required feature to be present, even if not advertised? webdavfs worked properly with Nextcloud, it would make a perfect modern alternative to the old davfs2 for me.

EDIT: Btw., maybe someone here, who is familiar with the inner workings of WebDAV, has an idea related to this problem: https://help.nextcloud.com/t/webdav-extremely-slow-on-linux-using-davfs2-mount/123811 ?

@sambler
Copy link

sambler commented Jan 18, 2022

I don't think it is worth opening a new issue, as I am getting the same error with a cpanel webdav setup.

I can add the rwdirops option and skip the "no PUTS range" error, I can then create and delete a dir, but creating or editing a file fails.

I am using FreeBSD 13 and build webdavfs using the newest master revision

% curl -i -X OPTIONS https://XXXX.com:2078
HTTP/1.1 200 OK
Date: Tue, 18 Jan 2022 06:43:12 GMT
Server: cPanel
Persistent-Auth: false
Host: XXXX.com:2078
Cache-Control: no-cache, no-store, must-revalidate, private
Connection: Keep-Alive
Vary: Accept-Encoding
Allow: POST, UNLOCK, HEAD, PUT, MOVE, DELETE, PROPPATCH, LOCK, COPY, MKCOL, GET, PROPFIND, OPTIONS
Content-Length: 0
Content-Type: text/plain
Expires: Fri, 01 Jan 1990 00:00:00 GMT
DAV: 1, 2
Keep-Alive: timeout=15, max=96
MS-Author-Via: DAV

@Evidlo
Copy link

Evidlo commented Nov 17, 2022

Looking through the source code, you can force this to be enabled with the option -o rwdirops option.

webdavfs/main.go

Lines 263 to 266 in 117d633

if !dav.CanPutRange() && !mountOpts.ReadOnly && !mountOpts.ReadWriteDirOps {
fmt.Fprintf(os.Stderr, "%s: no PUT Range support, mounting read-only\n", url)
mountOpts.ReadOnly = true
}

@miquels
Copy link
Owner

miquels commented Apr 7, 2023

I've added a mount option "sabredav_partialupdate" to force using the sabredav partialupdate protocol even when the remote server doesn't advertise support for it. See 5751a44

@miquels miquels closed this as completed Apr 7, 2023
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

No branches or pull requests

5 participants