mirror of
https://github.com/infinite-iroha/touka.git
synced 2026-02-03 00:41:10 +08:00
This commit introduces a simplified high-level API for the WebDAV submodule and fixes a comprehensive set of critical bugs, security vulnerabilities, and spec-compliance issues. Key enhancements include: - A new, user-friendly API (`webdav.Serve`, `webdav.Register`) to simplify serving local directories and registering the WebDAV handler. - An updated example (`examples/webdav/main.go`) demonstrating the new, cleaner API. Bug fixes and hardening: - **Data Integrity:** Fixed a data-loss bug in `memFile.Write` where overwriting parts of a file could truncate it. - **Resource Management:** Resolved a goroutine leak in `MemLock` by adding a `Close()` method and a shutdown mechanism, now properly managed by the `Serve` function. - **Recursive Deletion:** Implemented correct recursive deletion in `MemFS.RemoveAll` to ensure proper cleanup. - **Locking:** Fixed a bug in `MemLock.Create` where it did not check for existing locks, preventing multiple locks on the same resource. |
||
|---|---|---|
| .. | ||
| easy.go | ||
| easy_test.go | ||
| memfs.go | ||
| memlock.go | ||
| osfs.go | ||
| webdav.go | ||
| webdav_test.go | ||