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

client: handle propfind response from Nginx dav ext #59

Closed
wants to merge 2 commits into from

Conversation

skshetry
Copy link
Owner

It sends a 207 MULTISTATUS response and contains a 404 inside
propstat:status instead of just returning a 404 status code.

It's a bit tricky to use propstat:status for webdav4, as they may
be status for properties, not the resource, and might impact other
webdav servers like Owncloud/Nextcloud, as they return multiple
propstats.

For now, the change only affects propfind users. Also fixed
isfile and isdir to not raise ResourceNotFound error, and
instead just return False.

It sends a 207 MULTISTATUS response and contains a 404 inside
propstat:status instead of just returning a 404 status code.

It's a bit tricky to use propstat:status for webdav4, as they may
be status for properties, not the resource, and might impact other
webdav servers like Owncloud/Nextcloud, as they return multiple
propstats.

For now, the change only affects propfind users. Also fixed
`isfile` and `isdir` to not raise ResourceNotFound error, and
instead just return False.
@codecov-commenter
Copy link

codecov-commenter commented Sep 17, 2021

Codecov Report

Merging #59 (c1c999a) into main (54218d7) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #59   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           29        29           
  Lines         3311      3358   +47     
  Branches       191       195    +4     
=========================================
+ Hits          3311      3358   +47     
Impacted Files Coverage Δ
src/webdav4/client.py 100.00% <100.00%> (ø)
src/webdav4/multistatus.py 100.00% <100.00%> (ø)
tests/test_client.py 100.00% <100.00%> (ø)
tests/test_multistatus.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 54218d7...c1c999a. Read the comment docs.

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.

2 participants