Coder Social home page Coder Social logo

seafdav's People

Contributors

andkrau avatar caixiangyue avatar dependabot[bot] avatar djmattyg007 avatar dobesv avatar feiniks avatar fngx avatar freeplant avatar harobed avatar hr0109 avatar icarito avatar imwhatiam avatar joecoder1021 avatar johaven avatar jonasbardino avatar mainboarder avatar mar10 avatar milos-u avatar n3storm avatar noobieotsute avatar nsymms avatar ph0tonic avatar pokoli avatar pws21 avatar rootraider avatar steffende avatar tobiaspatton-s4 avatar tomviner avatar tworec avatar uwohlfeil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

seafdav's Issues

Fix licensing issues

Hi.

it seems like you forked https://github.com/mar10/wsgidav, which is under MIT license. You then added proprietary licensing for your code part in commit cec6abc and later removed it again in commit 53bdd3a.

The problem is, that you removed the license file in commit 42dfd99.

At least for the part written by you, it has to be clear, that it is under MIT license.
Of course it would be nice, if the rest would be under MIT license, too (as in commit 53bdd3a).

Simply restoring the license file of commit 53bdd3a would be an appropriate solution, if this is okay for you.

Webdav Upload Fail Umlauts (äöü)

Hello,

ive got a problem with uploading pdfs with umlauts in the name.
[example: 20161028 - Kündigung.pdf]
The webdav client just gives the error "upload failed" in seafile the file has 0 byte and is named "20161028 - Kündigung.pdf".
Its an encoding error in fast-cgi.

And my seafdav.conf looks like this.

[WEBDAV]
enabled = true
port = 8080
fastcgi = true
share_name = /seafdav

Furthermore i added this to my nginx /seafdav config.
charset utf-8;
override_charset on;

Here is the error log:
tail -fn 200 /var/log/nginx/seafdav.error.log

2017/07/08 15:32:11 [error] 30552#30552: *30791 FastCGI sent in stderr: "" while reading response header from upstream, client: 192.168.16.101, server: seafile.de, request: "PUT /seafdav/Dokumente-Mac/iPhone%20Scan%20Upload/20170708%20-%20Ku%CC%88ndigungsbesta%CC%88tigung%20.pdf HTTP/2.0", upstream: "fastcgi://127.0.0.1:8080", host: "seafile.de"
2017/07/08 15:32:11 [error] 30552#30552: *30791 FastCGI sent in stderr: "Traceback (most recent call last):
File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/flup-1.0.2-py2.7.egg/flup/server/fcgi_base.py", line 558, in run
protocolStatus, appStatus = self.server.handler(self)
File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/flup-1.0.2-py2.7.egg/flup/server/fcgi_base.py", line 1120, in handler
for data in result:
File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/wsgidav/wsgidav_app.py", line 397, in call
for v in app_iter:
File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/wsgidav/debug_filter.py", line 154, in call
for v in app_iter:
File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/wsgidav/error_printer.py", line 43, in call
for v in app_iter:
File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/wsgidav/request_resolver.py", line 201, in call
for v in app_iter:
File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/wsgidav/request_server.py", line 113, in call
app_iter = method(environ, start_response)
File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/wsgidav/request_server.py", line 638, in doPUT
res = parentRes.createEmptyResource(util.getUriName(path))
File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/wsgidav/addons/seafile/seafile_dav_provider.py", line 320, in createEmptyResource
seafile_api.post_empty_file(self.repo.id, self.rel_path, name, self.username)
File "/opt/seafile/seafile-server-6.1.1/seafile/lib64/python2.6/site-packages/seaserv/api.py", line 225, in post_empty_file
filename, username)
File "/opt/seafile/seafile-server-6.1.1/seafile/lib64/python2.6/site-packages/pysearpc/client.py", line 112, in newfunc
return fret(ret_str)
File "/opt/seafile/seafile-server-6.1.1/seafile/lib64/python2.6/site-packages/pysearpc/client.py", line 11, in _fret_int
raise SearpcError(dicts['err_msg'])
SearpcError: file already exists" while reading response header from upst
2017/07/08 15:32:48 [error] 30552#30552: *30804 FastCGI sent in stderr: "Traceback (most recent call last):
File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/flup-1.0.2-py2.7.egg/flup/server/fcgi_base.py", line 558, in run
protocolStatus, appStatus = self.server.handler(self)
File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/flup-1.0.2-py2.7.egg/flup/server/fcgi_base.py", line 1120, in handler
for data in result:
File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/wsgidav/wsgidav_app.py", line 397, in call
for v in app_iter:
File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/wsgidav/debug_filter.py", line 154, in call
for v in app_iter:
File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/wsgidav/error_printer.py", line 43, in call
for v in app_iter:
File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/wsgidav/request_resolver.py", line 201, in call
for v in app_iter:
File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/wsgidav/request_server.py", line 113, in call
app_iter = method(environ, start_response)
File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/wsgidav/request_server.py", line 638, in doPUT
res = parentRes.createEmptyResource(util.getUriName(path))
File "/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/wsgidav/addons/seafile/seafile_dav_provider.py", line 320, in createEmptyResource
seafile_api.post_empty_file(self.repo.id, self.rel_path, name, self.username)

Support hash and modtime comparison with RClone

Rclone is a command line program to manage files on cloud storage. It support WebDAV and on Onecloud and Nextcloud it uses hashes and modtimes when comparing files.

Please add support for hash and modtime comparisons.

Note: I did try using the Seafile connector, but it didn't support hashes or modtimes and it would intermittently fail.

Webdav Authentication glitch

Hi!

I have just discovered a glitch in the username handling. Given the user "[email protected]" and password "testtest", it is possible to authenticate and browse via webdav, when providing a Username with trailing whitespace: e.g.: "[email protected] ". Moving, Uploading and Deleting is not possible with these credentials.

uploading large files leads to 499

While uploading large (almost 8GB) file via webdav I got this:

192.168.xxx.xxx [email protected] [22/Jun/2015:20:23:48 +0200] "PUT /seafdav/tmp/Test/de_visual_studio_ultimate_2013_with_update_4_x86_dvd_5935076.iso HTTP/1.1" 499 0 "-" "Microsoft-WebDAV-MiniRedir/6.3.9600"

which leads to

[2015-06-22 20:18:57,516]:  PUT: Content-Length == 0. Creating empty file...

Because we can not influence the client and windows did wait at least 30 seconds (which is quite much because at the same time the webdav windows isn't usable at all I have the following idea to fix this:
add a background worker for webdav and process all files bigger than size x ever 30 seconds.
It would work as follow:

  • user uploads file
  • if bigger smaller than x save to seafile and return
  • if bigger than x save to tmp, add job to sql table and return
  • backgroundworker looks up the sql table every x seconds and indexes new files, on finish it removes the job on error it adds a notification for the user who uploaded the file that the upload could not finish.

Seafdav: upload files more then 2Gb

When I try to upload big files, more then 2 Gb I have an error (seafdav.log):

invalid literal for int() with base 16: "\x1aE\xdf\xa3\xa3B\x86\x81\x01B\xf7\x81\x01B\xf2\x81\x04B\xf3\x81\x08B\x82\x88matroskaB\x87\x81\x02B\x85\x81\x02\x18S\x80g\x01\x00\x00\x01\x12V\xaa\xf1\x11M\x9bt\xbfM\xbb\x8cS\xab\x84\x15I\xa9fS\xac\x82\x10\x03M\xbb\x8cS\xab\x84\x16T\xaekS\xac\x82\x10\xa1M\xbb\x8fS\xab\x84\x1cS\xbbkS\xac\x85\x01\x12U\xf0,M\xbb\x8cS\xab\x84\x10C\xa7pS\xac\x82\x17\xaa\xecO\xbc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15I\xa9f@\x98*\xd7\xb1\x83\x0fB@M\x80\xa3libebml v1.2.3 + libmatroska v1.3.0WA\xc3mkvmerge v5.8.0 ('No Sleep / Pillow') built on Sep 2 2012 15:37:04D\x89\x84J\xd4\xb0\x80Da\x88\x07\x12\x0e\x90\x1e\xbb\xf0\x00s\xa4\x90\xb5\x9aT\x04\x84m1*\x9e\xc0)\t\xb4`0\xc1\x16T\xaekB\x0c\xae\xf6\xd7\x81\x01s\xc5\x88\xac=\xf3\x9b?\xbd\n"

Can you help me ?

gunicorn timeout needs to be increased

The Gunicorn timeout is left at the default (30s I believe). This means that for some larger data sets and depending on client implementation the worker thread may be left idle and the stream will reset and the operation will not complete.

In _wsgidav/server/server_cli.py we need to add an increased timeout (see example below):

def _run_gunicorn(app, config, mode):
options = {
'bind': '%s:%s' % (config.get('host'), config.get('port')),
'workers': 5,
'timeout': 1200,
"pidfile": config.get('pidfile'),
}

WEBdav having issues moving files on server

I am having problems with webDAV since having upgraded to 6.0.3. Im am using the webdav feature with nginx as a webserver. Prior to upgrading, I was perfectly happy with syncing my files from phone via foldersync.

Now FolderSync gives me an error:

file transfer failed: FILE
attempt to read from field java.lang.strict.dk.tacit.android.providers.file.providerfile.displaypath on a null     object reference

From seavdav.error.log:

File "/home/seafile/seafile/seafile-server-6.0.3/seahub/thirdpart/wsgidav/request_server.py", line 902, in      _copyOrMove
srcRes, HTTP_NO_CONTENT, errorList)
File "/home/seafile/seafile/seafile-server-6.0.3/seahub/thirdpart/wsgidav/request_server.py", line 146,    in  _sendResponse
return util.sendStatusResponse(environ, start_response, errorList[0][1])
File "/home/seafile/seafile/seafile-server-6.0.3/seahub/thirdpart/wsgidav/util.py", line 758, in  sendStatusResponse
assert type(body) is str # If not, Content-Length is wrong!
AssertionError" while reading response header from upstream, client: 10.0.0.1, server: XXX.XXX.net,   request:   "MOVE /seafdav/FOLDER/FILE/2
2016/09/17 20:16:19 [error] 9495#0: *178168 FastCGI sent in stderr: "" while reading response header   from  upstream, client: 10.0.0.1, server: XXX.XXX.net, request: "MOVE /seafdav/seafdav/FILE/XY

It seems as if the problem is only with moving/deleting the file after is has been uploaded. The upload itself works fine. In my case, FolderSync creates a tempfile:

file.tacitpart

and moves it when the upload is complete to

file

Since I disabled the tempfile creation in FolderSync settings, the file uploads just fine.

Can't start seafdav on python3: ImportError: cannot import name 'collections_abc'

Before this error, seafdav not starting without any error in log file, because of missing wsgidav package, if I start manually via /usr/bin/python3 -m wsgidav.server.server_cli --server gunicorn --root / --log-file /opt/seafile-server/logs/seafdav.log --pid /opt/seafile-server/pids/seafdav.pid --port 8080 --host 0.0.0.0 - it show the error:

/usr/bin/python3: Error while finding module specification for 'wsgidav.server.server_cli' (ModuleNotFoundError: No module named 'wsgidav')

After installing via pip3 install wsgidav - it shows other error:

$ /usr/bin/python3 -m wsgidav.server.server_cli --server gunicorn --root / --log-file /opt/seafile-server/logs/seafdav.log --pid /opt/seafile-server/pids/seafdav.pid --port 8080 --host 0.0.0.0
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.6/dist-packages/wsgidav/server/server_cli.py", line 38, in <module>
    from wsgidav import __version__, util
  File "/usr/local/lib/python3.6/dist-packages/wsgidav/util.py", line 12, in <module>
    from wsgidav import compat
  File "/usr/local/lib/python3.6/dist-packages/wsgidav/compat.py", line 15, in <module>
    from six.moves import (
ImportError: cannot import name 'collections_abc'

How can i fix it?

CardDav and CalDav support

Are there any plans on introducing CalDav and CardDav support into the DAV module?

It works okay for file access, and for programs that can synchronize data over webdav (gnote, etc). However, it would be handy to create a "Contacts" library, for example, which could then be shared amongst some people.

RFC custom dav properties

Hello,

I am writing an 3rd party integration for Seafile using the API and WebDAV. Not sure if I should use WebDAV at all. But since I am re-using an existing project.

I have a question, does seafdav support custom dav properties? I looked in PropertyManagerInterface and this does not seem to be the case. It would be nice to have at least the parent repo_id. So I do not need to make an API call just to find that. And when using the API and DAV combined, I pretty much always need repo_id.

Right now I can do:

     curl --user 'user:password' -i -X PROPFIND https://server.example.com/seafdav/ --upload-file - -H "Depth: 1" <<end
     <?xml version="1.0"?>
     <a:propfind xmlns:a="DAV:">
     <a:prop><a:resourcetype/></a:prop>
     </a:propfind>
     end

I want to extend it to:

     curl --user 'user:password' -i -X PROPFIND https://server.example.com/seafdav/ --upload-file - -H "Depth: 1" <<end
     <?xml version="1.0"?>
     <a:propfind xmlns:a="DAV:">
     <a:prop xmlns:sf=”http://seafile.org/sf">
     <a:prop><a:resourcetype/></a:prop>
     <sf:parentrepoid/>
     </a:propfind>
     end

For example Nextcloud implements custom DAV properties as well to support their file-sharing API's when used in combination with DAV.

See also
https://www.greenbytes.de/tech/webdav/draft-reschke-webdav-allprop-include-latest.html

seafdav.pid file prevents seafdav start

If the file <seafile root>/pids/seafdav.pid is not removed, for example after a server crash, seafdav is not automatically restarted when you (re)start the seafile service.

In my case, there was only a PID without a new line in the file. When I ran ps aux|grep PID, there was no process with this PID on the system. I double checked with netstat -tlpn|grep PORT that no process was listening.

Once you spotted the problem, the fix is really simple as you just need to remove this file and restart seafile.

I'm running Seafile 6.2.2 downloaded from seafile.com on Debian Testing (amd64)

Sorry by advance if it's not the right place to report this issue or if this issue has been already reported.

Authorization Bearer using SSO

Is it possible to use a bearer token for authorization? I'm configuring Seafile for single sign-on (SSO) with the OpenID Connect protocol and a Keycloak server, but I keep getting a 401 error no matter what I try, even when using the SSO-authenticated user's sessionid cookie. It seems like only the Authorization: Basic method works for seafdav. Why is that, and how can I make seafdav work with SSO-delegated user?
Just to make it clear: You can't use basic authorization for SSO users as intended

Seafdav issue with "Joplin" Android client…

Hi,

As described in this post, I am unable to connect my seafdav account on my android client.
At first sight, I was thinking about a problem in the android app, but it works fine with other webdav servers, so…
Then I installed a wgsiDAV instance on my server, and I succeeded in login on it.
So, now, I really think about a problem in "Seafdav" rather than the android client…
Which is strange because seadav seems to be a fork of wsgiDAV?!…

Any idea about this strange behaviour?

Can't login with LDAP synced user using UID

I configured LDAP synchronization and able to login into Seafile Web UI with both email and UID. Doesn't work with WebDAV. Login with mail works but when trying to login with UID it fails and in the seafdav.log I see the following

User test doesn't exist

Where is run_server?

Hi

I noticed that the entry point indicated inside the run.sh is wsgidav.server.run_server. But under ./wsgidav/server I see no module named run_server. Can you tell me where that is?

ERROR : PUT: byte copy failed -- Upload of MOV files via WebDAV not possible.

Describe the bug
I use https://www.photosync-app.com to backup my photos and videos from my iPhone.
I initially used Nextcloud with Webdav (no problems) and have now switched to Seafile.
I can upload all photos using Webdav without any problems, but no live photos and videos, both use MOV files.
Why is it not possible to upload MOV files?
I use haproxy as a load balancer for https, however, the problem also occurs with http without proxy (the proxy is not the problem).
I use Seafile with Docker (image: seafileltd/seafile-mc:latest)

similar error: https://forum.seafile.com/t/webdav-upload-big-files/4546

./seafile/conf/seafdav.conf
INFO: Tested with "fastcgi = true" and without

[WEBDAV]
enabled = true
port = 8080
fastcgi = true
share_name = /seafdav

./seafile/logs/seafdav.log

18:24:28.175 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:24:28] "OPTIONS /Bilder" length=0, elap=0.018sec -> 200 OK
18:24:28.227 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:24:28] "MKCOL /Bilder/iPhone15Pro-CB" length=0, depth=0, elap=0.018sec -> 405 Method Not Allowed
18:24:28.300 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:24:28] "MKCOL /Bilder/iPhone15Pro-CB/Zuletzt" length=0, depth=0, elap=0.065sec -> 405 Method Not Allowed
18:24:28.740 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:24:28] "PROPFIND /Bilder/iPhone15Pro-CB/Zuletzt/" length=0, depth=1, elap=0.427sec -> 207 Multi-Status
18:24:29.634 - ERROR   : PUT: byte copy failed
Traceback (most recent call last):
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 837, in do_PUT
    fileobj.writelines(data_stream)
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 686, in _stream_data_chunked
    length = int(buf, 16)
ValueError: invalid literal for int() with base 16: b'\x00\x00\x00\x14ftypqt  \x00\x00\x00\x00qt  \x00\x00\x00\x08wide\x00-l\xb0mdaty\x00m\x00[\x00G\x005\x00\'\x00\x17\x00\x00\x00\xec\xff\xda\xff\xcc\xff\xbc\xff\xa6\xff\x9e\xff\x96\xff\x8f\xff\x95\xff\
18:24:29.635 - ERROR   : Caught HTTPRequestException(HTTP_INTERNAL_ERROR)
Traceback (most recent call last):
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 837, in do_PUT
    fileobj.writelines(data_stream)
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 686, in _stream_data_chunked
    length = int(buf, 16)
ValueError: invalid literal for int() with base 16: b'\x00\x00\x00\x14ftypqt  \x00\x00\x00\x00qt  \x00\x00\x00\x08wide\x00-l\xb0mdaty\x00m\x00[\x00G\x005\x00\'\x00\x17\x00\x00\x00\xec\xff\xda\xff\xcc\xff\xbc\xff\xa6\xff\x9e\xff\x96\xff\x8f\xff\x95\xff\

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/error_printer.py", line 50, in __call__
    for v in app_iter:
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_resolver.py", line 224, in __call__
    for v in app_iter:
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 127, in __call__
    app_iter = provider.custom_request_handler(environ, start_response, method)
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/dav_provider.py", line 1594, in custom_request_handler
    return default_handler(environ, start_response)
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 847, in do_PUT
    util.fail(e)
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/util.py", line 949, in fail
    raise e
wsgidav.dav_error.DAVError: 500

18:24:29.635 - ERROR   : e.src_exception:
invalid literal for int() with base 16: b'\x00\x00\x00\x14ftypqt  \x00\x00\x00\x00qt  \x00\x00\x00\x08wide\x00-l\xb0mdaty\x00m\x00[\x00G\x005\x00\'\x00\x17\x00\x00\x00\xec\xff\xda\xff\xcc\xff\xbc\xff\xa6\xff\x9e\xff\x96\xff\x8f\xff\x95\xff\
18:24:29.635 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:24:29] "PUT /Bilder/iPhone15Pro-CB/Zuletzt/IMG_3298.MOV" elap=0.150sec -> 500 Internal Server Error
18:24:56.925 - INFO    : 172.23.10.2 - (anonymous) - [2023-11-23 17:24:56] "OPTIONS /Bilder" length=0, elap=0.000sec -> 401 Not Authorized
18:24:56.956 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:24:56] "OPTIONS /Bilder" length=0, elap=0.013sec -> 200 OK
18:24:57.004 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:24:57] "MKCOL /Bilder/iPhone15Pro-CB" length=0, depth=0, elap=0.014sec -> 405 Method Not Allowed
18:24:57.040 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:24:57] "MKCOL /Bilder/iPhone15Pro-CB/Zuletzt" length=0, depth=0, elap=0.031sec -> 405 Method Not Allowed
18:24:57.442 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:24:57] "PROPFIND /Bilder/iPhone15Pro-CB/Zuletzt/" length=0, depth=1, elap=0.390sec -> 207 Multi-Status
18:24:58.248 - ERROR   : PUT: byte copy failed
Traceback (most recent call last):
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 837, in do_PUT
    fileobj.writelines(data_stream)
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 686, in _stream_data_chunked
    length = int(buf, 16)
ValueError: invalid literal for int() with base 16: b'\x00\x00\x00\x14ftypqt  \x00\x00\x00\x00qt  \x00\x00\x00\x08wide\x007\x86\x1fmdat\xa3\xfdH\x04R\n'
18:24:58.248 - ERROR   : Caught HTTPRequestException(HTTP_INTERNAL_ERROR)
Traceback (most recent call last):
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 837, in do_PUT
    fileobj.writelines(data_stream)
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 686, in _stream_data_chunked
    length = int(buf, 16)
ValueError: invalid literal for int() with base 16: b'\x00\x00\x00\x14ftypqt  \x00\x00\x00\x00qt  \x00\x00\x00\x08wide\x007\x86\x1fmdat\xa3\xfdH\x04R\n'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/error_printer.py", line 50, in __call__
    for v in app_iter:
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_resolver.py", line 224, in __call__
    for v in app_iter:
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 127, in __call__
    app_iter = provider.custom_request_handler(environ, start_response, method)
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/dav_provider.py", line 1594, in custom_request_handler
    return default_handler(environ, start_response)
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 847, in do_PUT
    util.fail(e)
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/util.py", line 949, in fail
    raise e
wsgidav.dav_error.DAVError: 500

18:24:58.248 - ERROR   : e.src_exception:
invalid literal for int() with base 16: b'\x00\x00\x00\x14ftypqt  \x00\x00\x00\x00qt  \x00\x00\x00\x08wide\x007\x86\x1fmdat\xa3\xfdH\x04R\n'
18:24:58.249 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:24:58] "PUT /Bilder/iPhone15Pro-CB/Zuletzt/IMG_3292.MOV" elap=0.121sec -> 500 Internal Server Error
18:25:08.910 - INFO    : 172.23.10.2 - (anonymous) - [2023-11-23 17:25:08] "OPTIONS /Bilder" length=0, elap=0.000sec -> 401 Not Authorized
18:25:08.940 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:08] "OPTIONS /Bilder" length=0, elap=0.013sec -> 200 OK
18:25:08.995 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:08] "MKCOL /Bilder/iPhone15Pro-CB" length=0, depth=0, elap=0.016sec -> 405 Method Not Allowed
18:25:09.030 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:09] "MKCOL /Bilder/iPhone15Pro-CB/Zuletzt" length=0, depth=0, elap=0.030sec -> 405 Method Not Allowed
18:25:09.473 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:09] "PROPFIND /Bilder/iPhone15Pro-CB/Zuletzt/" length=0, depth=1, elap=0.433sec -> 207 Multi-Status
18:25:11.583 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:11] "PUT /Bilder/iPhone15Pro-CB/Zuletzt/IMG_3284.HEIC" length=12701583, elap=1.396sec -> 201 Created
18:25:11.674 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:11] "MKCOL /Bilder/iPhone15Pro-CB" length=0, depth=0, elap=0.012sec -> 405 Method Not Allowed
18:25:11.711 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:11] "MKCOL /Bilder/iPhone15Pro-CB/Zuletzt" length=0, depth=0, elap=0.033sec -> 405 Method Not Allowed
18:25:13.216 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:13] "PUT /Bilder/iPhone15Pro-CB/Zuletzt/IMG_3283.HEIC" length=12899412, elap=1.493sec -> 201 Created
18:25:13.296 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:13] "MKCOL /Bilder/iPhone15Pro-CB" length=0, depth=0, elap=0.013sec -> 405 Method Not Allowed
18:25:13.344 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:13] "MKCOL /Bilder/iPhone15Pro-CB/Zuletzt" length=0, depth=0, elap=0.044sec -> 405 Method Not Allowed
18:25:13.934 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:13] "PUT /Bilder/iPhone15Pro-CB/Zuletzt/IMG_3282.HEIC" length=3366078, elap=0.568sec -> 201 Created
18:25:14.013 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:14] "MKCOL /Bilder/iPhone15Pro-CB" length=0, depth=0, elap=0.014sec -> 405 Method Not Allowed
18:25:14.060 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:14] "MKCOL /Bilder/iPhone15Pro-CB/Zuletzt" length=0, depth=0, elap=0.042sec -> 405 Method Not Allowed
18:25:14.613 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:14] "PUT /Bilder/iPhone15Pro-CB/Zuletzt/IMG_3281.HEIC" length=3338018, elap=0.531sec -> 201 Created

To Reproduce
Steps to reproduce the behavior:

  1. install Sefile with docker (https://manual.seafile.com/docker/deploy_seafile_with_docker/)
  2. enable webdav https://manual.seafile.com/extension/webdav/
  3. Upload photos with https://www.photosync-app.com/de/index

Expected behavior
That not only pictures but also videos (mov files) can be uploaded via Webdav.

Screenshots, Log-Files, Stacktrace
..

Environment:
docker

Missing LastModified for Folders

def get_last_modified(self):
# return int(time.time())
return None

The absence of this could cause problems with sync clients that check for the last modified date of a parent folder.

I hacked an implementation together that works by doing the following:

    def get_last_modified(self):
        cached_mtime = getattr(self.obj, 'last_modified', None)
        if cached_mtime:
            return cached_mtime
        
        try:
            mtimes = seafile_api.get_files_last_modified(self.repo.id, self.rel_path, 1)
        except SearpcError as e:
            raise DAVError(HTTP_INTERNAL_ERROR, e.msg)

        return max(mtime.last_modified for mtime in mtimes) if len(mtimes) else None

Whats the proper way to support this?
I set the traversal limit of get_files_last_modified to 1 to only get the last element, but I did not check if it even returns more than 1 file. For now it does exactly what I want it to do.

MOVE returns 502 Bad Gateway

I'm using FolderSync on my phone to sync a folder with seafile, but when it tires to upload files I get an error:

502 Bad Gateway: Source and destination must have the same scheme. If you are running behind a reverse proxy, you may have to rewrite the 'Destination' header.

I'm using Traefik as a reverse proxy and I don't know how to rewrite this header.

This issue is the same as mar10/wsgidav#183 and haiwen/seafile#2336.

wsgidav fixed this issue with https://github.com/mar10/wsgidav/pull/187/files, I suggest applying the same changes here.

Using the WebDAV, I can't play mp4 by nPlayer and PotPlayer

screen-capture

Using the WebDAV, I can't play mp4 by nPlayer and PotPlayer

Environment

  • Operation system: CentOS 7.6

  • Seafile version: Seafile PRO 7.0.3

Details

Step 1: Upload the MP4 file: test.mp4 to my repo.

Step 2: Get the URL: https://www.example.com/seafdav/xxxx/test.mp4

Step 3: Using player (nPlayer and PotPlayer) to play the test.mp4: http://www.example.com/seafdav/xxxx/test.mp4

Step 4: Error!

Attachment files

The attachment file screen-capture.png is screen capture of including error information.

The ZIP file test.zip include my MP4 file. the Other MP4 files isn't to play using WebDAV too.

Thank you!

getetag returns unquoted string

Describe the bug
The PROPFIND / request returns entries that contain unquoted etag values (instead of the RFC2616 section 3.11 that dictates quoted-string. See also https://greenbytes.de/tech/webdav/draft-ietf-webdav-rfc2518bis-14.html#n-getetag-property

    <D:response>
        <D:href>/Camera%20Upload/My%20Photos/Camera/IMG_20200812_081459244.jpg</D:href>
        <D:propstat>
            <D:prop>
                <D:resourcetype></D:resourcetype>
                <D:getcontentlength>3267942</D:getcontentlength>
                <D:getcontenttype>image/jpeg</D:getcontenttype>
                <D:getlastmodified>Wed, 12 Aug 2020 14:14:24 GMT</D:getlastmodified>
                <D:displayname>IMG_20200812_081459244.jpg</D:displayname>
                <D:getetag>0aa1cc5135610b957fa603bae09808a4d7ce04cf</D:getetag>
                <D:lockdiscovery/>
                <D:supportedlock>
                    <D:lockentry>
                        <D:lockscope>
                            <D:exclusive/>
                        </D:lockscope>
                        <D:locktype>
                            <D:write/>
                        </D:locktype>
                    </D:lockentry>
                    <D:lockentry>
                        <D:lockscope>
                            <D:shared/>
                        </D:lockscope>
                        <D:locktype>
                            <D:write/>
                        </D:locktype>
                    </D:lockentry>
                </D:supportedlock>
            </D:prop>
            <D:status>HTTP/1.1 200 OK</D:status>
        </D:propstat>
    </D:response>

Specifically this line:

                <D:getetag>0aa1cc5135610b957fa603bae09808a4d7ce04cf</D:getetag>

To Reproduce
Do a HTTP PROPFIND request to /

Expected behavior
Entries with getetag to include quotes, always.

Environment:
Direct HTTP request.

Additional context
This causes issues with e.g. https://github.com/emersion/go-webdav and software that uses it, like https://github.com/photoprism/photoprism

Kerberos Authentication in seafdav, minimal patch provided.

We use Seafile WebDAV with Kerberos (using FreeIPA). This currently needs a small patch which could be made optional and integrated in Seafile. I attached it below.
The key HTTP_REMOTE_USER should also be configurable. Obviously this only works if all users are stored in LDAP anyway.

It works nicely with native WebDAV support in LibreOffice, eliminating the need to store passwords in Libreoffice (and typing the master password).

--- seafile-server-4.0.6_orig/seahub/thirdpart/wsgidav/http_authenticator.py    2015-02-04 08:08:22.000000000 +0100
+++ seafile-server-4.0.6/seahub/thirdpart/wsgidav/http_authenticator.py 2015-02-09 14:49:05.275859317 +0100
@@ -167,6 +167,11 @@

         _logger.debug("realm '%s'" % realmname)
         # _logger.debug("%s" % environ)
+        if "HTTP_REMOTE_USER" in environ: # and (not self._acceptdigest and not self._acceptbasic):
+            _logger.debug("HTTP_REMOTE_USER: %s" % environ["HTTP_REMOTE_USER"])
+            environ["http_authenticator.realm"] = realmname
+            environ["http_authenticator.username"] = environ["HTTP_REMOTE_USER"].lower()
+            return self._application(environ, start_response)

         force_allow = False
         if HOTFIX_WIN_AcceptAnonymousOptions and environ["REQUEST_METHOD"] == "OPTIONS":

High IO Wait if i play a 4k video by webdav and server crash in the end

I put a 4k video in the Seafile and play it in Kodi player via webdav, totally about 13gb. It works in the beginning, however some minutes later the video play get stuck. I checked the server and found the IO Wait is more then 70 percent. I had to kill the seafdav process to forbid the server crashing. Could you please help on this issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.