flounder

A simple gemini site builder
Log | Files | Refs | README | LICENSE

commit ede64505c720b2a203f8b9ab8074daa4a4e3fb3b
parent 0c334fb679f6a4418ac74503b30014d660770349
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sat, 12 Dec 2020 00:40:44 -0800

Add error handling, setup lock system

Diffstat:
Mwebdav.go | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/webdav.go b/webdav.go @@ -15,11 +15,13 @@ func webdavHandler(w http.ResponseWriter, r *http.Request) { } user, pass, ok := r.BasicAuth() if ok && (checkAuth(user, pass) == nil) { - fmt.Println(user, pass) webdavHandler := webdav.Handler{ FileSystem: webdav.Dir(getUserDirectory(user)), Prefix: "/webdav/", - LockSystem: nil, //webdav.NewMemLS(), + LockSystem: webdav.NewMemLS(), + Logger: func(r *http.Request, e error) { + fmt.Println(e) + }, } webdavHandler.ServeHTTP(w, r) } else {