Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

Http GET on dav path of a folder gives 501 #106

Closed
dpakach opened this issue Mar 2, 2020 · 3 comments
Closed

Http GET on dav path of a folder gives 501 #106

dpakach opened this issue Mar 2, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@dpakach
Copy link
Contributor

dpakach commented Mar 2, 2020

sending http GET on dav path of a folder gives 501 response even if the folder exists

curl -X GET http://localhost:9140/remote.php/dav/files/user0/simple -u user0:123456 -v
Note: Unnecessary use of -X or --request, GET is already inferred.
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 9140 (#0)
* Server auth using Basic with user 'user0'
> GET /remote.php/dav/files/user0/simple HTTP/1.1
> Host: localhost:9140
> Authorization: Basic dXNlcjA6MTIzNDU2
> User-Agent: curl/7.58.0
> Accept: */*
> 
< HTTP/1.1 501 Not Implemented
< Access-Control-Allow-Origin: *
< Vary: Origin
< X-Access-Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNTgzMTMyNzg5LCJpYXQiOjE1ODMxMjkxODksInVzZXIiOnsiaWQiOnsib3BhcXVlX2lkIjoidXNlcjAifSwidXNlcm5hbWUiOiJ1c2VyMCIsIm1haWwiOiJ1c2VyMEBleGFtcGxlLm9yZyIsImRpc3BsYXlfbmFtZSI6IlVzZXIgWmVybyJ9fQ.6zvWT0ndM6H9t8zyrEC9F4XF1Mo6IlmWGzbAao7_gMg
< Date: Mon, 02 Mar 2020 06:06:29 GMT
< Content-Length: 0
< 
* Connection #0 to host localhost left intact 
@dpakach dpakach added the bug Something isn't working label Mar 2, 2020
@PVince81
Copy link
Contributor

hmm, but GET is not legal on Webdav collections, not sure why this is needed ?

if you want to detect whether a folder/collection exists, use a PROPFIND instead and check for 404

@dpakach dpakach assigned Talank and unassigned Talank May 6, 2020
@PVince81
Copy link
Contributor

I've adjusted the testing code to use PROPFIND instead of GET here and reenabled the tests: owncloud/web#3457

@PVince81
Copy link
Contributor

Fixed through owncloud/web#3473

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants