Encode path to NFC
This commit is contained in:
parent
0f17808887
commit
771e160f78
2 changed files with 6 additions and 5 deletions
|
@ -6,10 +6,8 @@ See [Seafile Server Manual](http://manual.seafile.com/extension/webdav.html) for
|
|||
|
||||
# Running
|
||||
|
||||
There are two templates for running seafdav:
|
||||
There are a template for running seafdav:
|
||||
- run.sh.template: This is for running seafdav on the default 8080 port with a built-in CherryPy server.
|
||||
- run-fcgi.sh.template and seafdav.conf.template:
|
||||
These two files are for running seafdav on fastcgi mode.
|
||||
|
||||
To run on 8080 port:
|
||||
|
||||
|
@ -24,10 +22,10 @@ Then change CCNET_CONF_DIR and SEAFILE_CONF_DIR to your Seafile server's setting
|
|||
- start local seafile server
|
||||
- start local seahub server (While seafdav itself doesn't require seahub, we use seahub webapi as a driver for testing)
|
||||
- start seafdav server
|
||||
- create a test user `test@seafiltest.com` with password `test`
|
||||
- create a test user `test@seafiletest.com` with password `test`
|
||||
- Run the tests
|
||||
```
|
||||
export CCNET_CONF_DIR=/path/to/ccnet
|
||||
export SEAFILE_CONF_DIR=/path/to/seafile-data
|
||||
./functest.sh test
|
||||
./ci/functest.sh test
|
||||
```
|
||||
|
|
|
@ -7,6 +7,7 @@ import wsgidav.util as util
|
|||
import os
|
||||
import time
|
||||
import posixpath
|
||||
import unicodedata
|
||||
|
||||
import tempfile
|
||||
|
||||
|
@ -738,6 +739,7 @@ class SeafileProvider(DAVProvider):
|
|||
return SeafileResource(path, repo, rel_path, obj, environ, self.block_map, self.block_map_lock)
|
||||
|
||||
def resolvePath(path, username, org_id, is_guest):
|
||||
path = unicodedata.normalize('NFC', path)
|
||||
segments = path.strip("/").split("/")
|
||||
if len(segments) == 0:
|
||||
raise DAVError(HTTP_BAD_REQUEST)
|
||||
|
@ -767,6 +769,7 @@ def resolvePath(path, username, org_id, is_guest):
|
|||
return (repo, rel_path, obj)
|
||||
|
||||
def resolveRepoPath(repo, path):
|
||||
path = unicodedata.normalize('NFC', path)
|
||||
segments = path.strip("/").split("/")
|
||||
|
||||
obj = get_repo_root_seafdir(repo)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue