owncloud / owncloud/core

Getting different status codes in WebDav endpoints

Open
#36,596 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type:Bug
Dominant language
PHP
Stars
8.8k
Forks
2.1k
Avg merge
20h 7m
Merged PRs (30d)
41

Description

Description

When we try to send request to webDav endpoints for files that doesn't exist then we get different StatusCodes for different actions
For eg.
When sending request

curl -X MOVE http://<base_url>/remote.php/webdav/textfile0.txt -u admin:admin -v

We get 403 - FORBIDDEN

But when sending request to a similar endpoint but different method

curl -X DELETE http://<base_url>/remote.php/webdav/textfile0.txt -u admin:admin -v

We get 404 - NOT FOUND

Not sure which is the correct one but, must be 404 IMO.

note that file textfile0.txt doesn't exists for user admin

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the two requests against the WebDAV endpoints described in the issue, using the missing textfile0.txt path and admin credentials. Trace how MOVE and DELETE handle a missing file and compare their status-code decisions. Done means the behavior is clarified and the endpoints return the agreed consistent response, with coverage for both methods.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.