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

WebDAV PROPFIND results in 503 from browser #7365

Closed
perry-mitchell opened this issue Dec 2, 2017 · 3 comments
Closed

WebDAV PROPFIND results in 503 from browser #7365

perry-mitchell opened this issue Dec 2, 2017 · 3 comments

Comments

@perry-mitchell
Copy link

Steps to reproduce

  1. Open demo account on Nextcloud service
  2. Make XHR request (PROPFIND) to Nextcloud WebDAV, to either of the following URLs:
  • https://demo.nextcloud.com/aipeev4r/remote.php/dav/files/admin/
  • https://demo.nextcloud.com/aipeev4r/remote.php/webdav/

Expected behaviour

A successful PROPFIND request+response (contents of root returned)

Actual behaviour

I receive a 503 service unavailable:

image

Using the following request headers:

PROPFIND /aipeev4r/remote.php/dav/files/admin/ HTTP/1.1
Host: demo.nextcloud.com
Connection: keep-alive
Content-Length: 0
accept: */*
Origin: chrome-extension://bhjndcjjaoehhegenhjgihoamlngkbbd
authorization: Basic YWRtaW46YWRtaW4=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
depth: 1
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.8
Cookie: oc_sessionPassphrase=OdKOymloOyyBsRarho80%2FkJiEEqgUoJgGaBvt5nTCtZsWgMmIFHDr3kI%2BuRYFhJyGn9c8QIaJk5Q9Y0P2sM3dBWCwO6XoABxA4RaqQkTpUaxzeExjNGAtYZcA9bQZJNt; oc36ouklzxpc=daiiuu0vb21sm1aaic5bjifq22; PHPSESSID=fdsbguccp5gdjpnukdq8fcujsp

Server configuration

Operating system: As on demo.nextcloud.com.

Web server: As on demo.nextcloud.com.

Database: As on demo.nextcloud.com.

PHP version: As on demo.nextcloud.com.

Nextcloud version: 12.0.0

Updated from an older Nextcloud/ownCloud or fresh install: No

Where did you install Nextcloud from: Not applicable

(Rest of the items omitted due to them being generically configured by the Nextcloud demo service).

An exported HAR of the request can be found here.

We've been trying to integrate Nextcloud + Buttercup for many months now, to no avail. It works fine on the NodeJS (server) side, through WebDAV, but not when running in the browser. Previously we've seen CORS problems, and now we're seeing these 503s. We've tried the original example.com/remote.php/webdav URLs and the newer example.com/remote.php/dav/files/admin/ URLs (found in 12.0 docs). Both produce the same result.

I would love to work through this with someone, but I'm not sure how easy that might be. It's very frustrating and we'd love to keep Nextcloud integration, but if it works everywhere except for in the browser, we might consider dropping support in the near future. Any help would really, be greatly appreciated 😊.

@perry-mitchell
Copy link
Author

Exported as a cURL request for completeness:

curl 'https://demo.nextcloud.com/aipeev4r/remote.php/dav/files/admin/' -X PROPFIND -H 'Cookie: oc_sessionPassphrase=OdKOymloOyyBsRarho80%2FkJiEEqgUoJgGaBvt5nTCtZsWgMmIFHDr3kI%2BuRYFhJyGn9c8QIaJk5Q9Y0P2sM3dBWCwO6XoABxA4RaqQkTpUaxzeExjNGAtYZcA9bQZJNt; oc36ouklzxpc=daiiuu0vb21sm1aaic5bjifq22; PHPSESSID=fdsbguccp5gdjpnukdq8fcujsp' -H 'Origin: chrome-extension://bhjndcjjaoehhegenhjgihoamlngkbbd' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-US,en;q=0.8' -H 'authorization: Basic YWRtaW46YWRtaW4=' -H 'accept: */*' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36' -H 'Connection: keep-alive' -H 'Content-Length: 0' -H 'depth: 1' --compressed

@perry-mitchell
Copy link
Author

Turns out stupidity was at fault this time! I was trying to use node-fetch (npm library) to make the request, which has known issues with Nextcloud.

@jamecoyne
Copy link

I'm having the same issue. I'd love to see a solution if there is one.

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

2 participants