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

[Feature Request] Pass all tests for Thunar/PcmanFM (WebDAV) #32

Open
bohwaz opened this issue Dec 14, 2024 · 1 comment
Open

[Feature Request] Pass all tests for Thunar/PcmanFM (WebDAV) #32

bohwaz opened this issue Dec 14, 2024 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@bohwaz
Copy link

bohwaz commented Dec 14, 2024

Trying to access the WebDAV URL does not work.

Thunar/PcmanFM (GTK WebDAV backend): returns "this share does not handle webdav"
Dolphin (KDE) is just hanging with a loading message
Litmus test fails as well:

-> running `basic':
 0. init.................. pass
 1. begin................. FAIL (Could not create new collection `/dav/litmus/' for tests: 307 Temporary Redirect
Server must allow `MKCOL /dav/litmus/' for tests to proceed)
<- summary for `basic': of 2 tests run: 1 passed, 1 failed. 50.0%

Doing a PROPFIND request with curl works, but only if I omit the slash after dav:

% curl -X PROPFIND -v http://localhost:8000/dav -u XXX:YYY
*   Trying 127.0.0.1:8000...  
* Connected to localhost (127.0.0.1) port 8000 (#0)
* Server auth using Basic with user 'XXX'
> PROPFIND /dav HTTP/1.1
> Host: localhost:8000
> Authorization: Basic XXXXX
> User-Agent: curl/7.88.1
> Accept: */*
> 
< HTTP/1.1 207 Multi-Status
< access-control-allow-headers: Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, accept, origin, Cache-Control, X-Requested-With
< access-control-allow-methods: POST, OPTIONS, GET, PUT, DELETE
< content-type: text/xml; charset=utf-8
< access-control-allow-origin: *
< access-control-allow-credentials: true
< content-security-policy: default-src 'self'; child-src 'none'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline'
< x-frame-options: DENY
< x-content-type-options: nosniff
< strict-transport-security: max-age=31536000; includeSubDomains; preload
< vary: Accept-Encoding
< content-length: 2120
< date: Sat, 14 Dec 2024 17:12:38 GMT
< 
<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:">
…

So it seems that WebDAV is not completely implemented?

@BrunoBernardino
Copy link
Member

Thanks for reporting this @bohwaz ! indeed I never implemented the full WebDAV protocol, but rather enough, with the most important actions, necessary for the common actions with file management, and for rsync to also work.

I also always ran some clients in macOS and Gnome to test, not a specific test to verify everything, so it's possible something is missing that would make it pass.

That being said, MKCOL is implemented (to create directories):

bewcloud/routes/dav.tsx

Lines 135 to 141 in 24c0c41

if (request.method === 'MKCOL') {
try {
await Deno.mkdir(join(rootPath, filePath), { recursive: true });
return new Response('Created', { status: 201 });
} catch (error) {
console.error(error);
}

And a trailing slash should not work if you're not mapping to a specific directory. Do you not get a valid URL with that PROPFIND request?

@BrunoBernardino BrunoBernardino added help wanted Extra attention is needed enhancement New feature or request labels Dec 16, 2024
@BrunoBernardino BrunoBernardino changed the title WebDAV access does not work [Feature Request] Pass all tests for Thunar/PcmanFM (WebDAV) Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants