Commit graph

139 commits

Author SHA1 Message Date
google-labs-jules[bot]
b92f1face5 feat: add native WebDAV submodule and usability helpers
This commit introduces a new, high-performance, and extensible WebDAV submodule, implemented natively without external dependencies. It also adds a high-level API to simplify common use cases.

The submodule includes:
- A core WebDAV handler that supports essential methods: PROPFIND, MKCOL, GET, PUT, DELETE, COPY, MOVE, LOCK, and UNLOCK.
- An extensible design using a `FileSystem` interface to decouple the protocol logic from the storage backend.
- Two `FileSystem` implementations:
  - `MemFS`: An in-memory, tree-based filesystem for testing and ephemeral storage.
  - `OSFS`: A secure, OS-based filesystem that interacts with the local disk, including robust path traversal and symlink protection.
- A `LockSystem` interface with an in-memory implementation (`MemLock`) that supports resource locking and includes a graceful shutdown mechanism.
- A high-level API in `webdav/easy.go` (`Serve`, `Register`) to simplify serving local directories.
- RFC 4918 compliance for core operations.
- Performance optimizations, including `sync.Pool` for object reuse and `sync/atomic` for lock-free field access.
- Comprehensive unit tests and a working example application.

The Touka framework's core has been updated to recognize all WebDAV-specific HTTP methods. This implementation addresses numerous points from detailed code reviews, including security vulnerabilities, memory leaks, RFC compliance issues, and path handling bugs.
2025-12-11 02:53:19 +00:00
google-labs-jules[bot]
1d6e7a2633 feat: add native WebDAV submodule
This commit introduces a new, high-performance, and extensible WebDAV submodule, implemented natively without external dependencies.

The submodule includes:
- A core WebDAV handler that supports essential methods: PROPFIND, MKCOL, GET, PUT, DELETE, COPY, MOVE, LOCK, and UNLOCK.
- An extensible design using a `FileSystem` interface to decouple the protocol logic from the storage backend.
- Two `FileSystem` implementations:
  - `MemFS`: An in-memory, tree-based filesystem for testing and ephemeral storage. It correctly handles path segments like `.` and `..`.
  - `OSFS`: A secure, OS-based filesystem that interacts with the local disk. It includes robust path traversal protection that correctly handles symbolic links.
- A `LockSystem` interface with an in-memory implementation (`MemLock`) to support resource locking (DAV Class 2). It includes a graceful shutdown mechanism to prevent goroutine leaks.
- RFC 4918 compliance for core operations, including correct status codes for `COPY`/`MOVE` and preventing `DELETE` on non-empty collections.
- Performance optimizations, including the use of `sync.Pool` for object reuse and `sync/atomic` for lock-free field access to reduce GC pressure.
- Comprehensive unit tests covering all major functionalities.
- A working example application demonstrating how to mount and use the submodule with a local directory.

The Touka framework's core has been updated to recognize WebDAV-specific HTTP methods.

This implementation addresses numerous points from detailed code reviews, including security vulnerabilities, memory leaks, RFC compliance issues, and path handling bugs.
2025-12-10 22:35:33 +00:00
google-labs-jules[bot]
85409ba803 feat: add native WebDAV submodule
This commit introduces a new, high-performance, and extensible WebDAV submodule, implemented natively without external dependencies.

The submodule includes:
- A core WebDAV handler that supports essential methods: PROPFIND, MKCOL, GET, PUT, DELETE, COPY, MOVE, LOCK, and UNLOCK.
- An extensible design using a `FileSystem` interface to decouple the protocol logic from the storage backend.
- Two `FileSystem` implementations:
  - `MemFS`: An in-memory, tree-based filesystem for testing and ephemeral storage. It correctly handles path segments like `.` and `..`.
  - `OSFS`: A secure, OS-based filesystem that interacts with the local disk. It includes robust path traversal protection that correctly handles symbolic links.
- A `LockSystem` interface with an in-memory implementation (`MemLock`) to support resource locking (DAV Class 2). It includes a graceful shutdown mechanism to prevent goroutine leaks.
- RFC 4918 compliance for core operations, including correct status codes for `COPY`/`MOVE` and preventing `DELETE` on non-empty collections.
- Comprehensive unit tests covering all major functionalities.
- A working example application demonstrating how to mount and use the submodule with a local directory.

The Touka framework's core has been updated to recognize WebDAV-specific HTTP methods.

This implementation addresses numerous points from detailed code reviews, including security vulnerabilities, memory leaks, RFC compliance issues, and path handling bugs.
2025-12-10 22:05:20 +00:00
google-labs-jules[bot]
edc653b3b1 feat: add native WebDAV submodule
This commit introduces a new, high-performance, and extensible WebDAV submodule, implemented natively without external dependencies.

The submodule includes:
- A core WebDAV handler that supports essential methods: PROPFIND, MKCOL, GET, PUT, DELETE, COPY, MOVE, LOCK, and UNLOCK.
- An extensible design using a `FileSystem` interface to decouple the protocol logic from the storage backend.
- Two `FileSystem` implementations:
  - `MemFS`: An in-memory, tree-based filesystem for testing and ephemeral storage.
  - `OSFS`: A secure, OS-based filesystem that interacts with the local disk and includes path traversal protection.
- A `LockSystem` interface with an in-memory implementation (`MemLock`) to support resource locking (DAV Class 2).
- Comprehensive unit tests covering all major functionalities.
- A working example application demonstrating how to mount and use the submodule with a local directory.

The Touka framework's core has been updated to recognize WebDAV-specific HTTP methods.
2025-12-10 21:40:52 +00:00
google-labs-jules[bot]
33e5d5474d feat: add native WebDAV submodule
This commit introduces a new, high-performance, and extensible WebDAV submodule, implemented natively without external dependencies.

The submodule includes:
- A core WebDAV handler that supports essential methods: PROPFIND, MKCOL, GET, PUT, DELETE, COPY, MOVE, LOCK, and UNLOCK.
- An extensible design using a `FileSystem` interface to decouple the protocol logic from the storage backend.
- Two `FileSystem` implementations:
  - `MemFS`: An in-memory, tree-based filesystem for testing and ephemeral storage.
  - `OSFS`: A secure, OS-based filesystem that interacts with the local disk and includes path traversal protection.
- A `LockSystem` interface with an in-memory implementation (`MemLock`) to support resource locking (DAV Class 2).
- Comprehensive unit tests covering all major functionalities.
- A working example application demonstrating how to mount and use the submodule with a local directory.

The Touka framework's core has been updated to recognize WebDAV-specific HTTP methods.
2025-12-10 21:26:57 +00:00
google-labs-jules[bot]
8e10d51d6d feat: add native WebDAV submodule
This commit introduces a new, high-performance, and extensible WebDAV submodule, implemented natively without external dependencies.

The submodule includes:
- A core WebDAV handler that supports essential methods: PROPFIND, MKCOL, GET, PUT, DELETE, COPY, MOVE, LOCK, and UNLOCK.
- An extensible design using a `FileSystem` interface to decouple the protocol logic from the storage backend.
- Two `FileSystem` implementations:
  - `MemFS`: An in-memory, tree-based filesystem for testing and ephemeral storage.
  - `OSFS`: A secure, OS-based filesystem that interacts with the local disk and includes path traversal protection.
- A `LockSystem` interface with an in-memory implementation (`MemLock`) to support resource locking (DAV Class 2).
- Comprehensive unit tests covering all major functionalities.
- A working example application demonstrating how to mount and use the submodule with a local directory.

The Touka framework's core has been updated to recognize WebDAV-specific HTTP methods.
2025-12-10 21:06:01 +00:00
google-labs-jules[bot]
bf51bfcd4e feat: add native WebDAV submodule
This commit introduces a new, high-performance, and extensible WebDAV submodule, implemented natively without external dependencies.

The submodule includes:
- A core WebDAV handler that supports essential methods: PROPFIND, MKCOL, GET, PUT, DELETE, COPY, MOVE, LOCK, and UNLOCK.
- An extensible design using a `FileSystem` interface to decouple the protocol logic from the storage backend.
- Two `FileSystem` implementations:
  - `MemFS`: An in-memory, tree-based filesystem for testing and ephemeral storage.
  - `OSFS`: A secure, OS-based filesystem that interacts with the local disk and includes path traversal protection.
- A `LockSystem` interface with an in-memory implementation (`MemLock`) to support resource locking (DAV Class 2).
- Comprehensive unit tests covering all major functionalities.
- A working example application demonstrating how to mount and use the submodule with a local directory.

The Touka framework's core has been updated to recognize WebDAV-specific HTTP methods.
2025-12-10 20:59:20 +00:00
google-labs-jules[bot]
49902f9059 feat: add native WebDAV submodule
This commit introduces a new, high-performance, and extensible WebDAV submodule, implemented natively without external dependencies.

The submodule includes:
- A core WebDAV handler that supports essential methods: PROPFIND, MKCOL, GET, PUT, DELETE, COPY, MOVE, LOCK, and UNLOCK.
- An extensible design using a `FileSystem` interface to decouple the protocol logic from the storage backend.
- Two `FileSystem` implementations:
  - `MemFS`: An in-memory, tree-based filesystem for testing and ephemeral storage.
  - `OSFS`: A secure, OS-based filesystem that interacts with the local disk and includes path traversal protection.
- A `LockSystem` interface with an in-memory implementation (`MemLock`) to support resource locking (DAV Class 2).
- Comprehensive unit tests covering all major functionalities.
- A working example application demonstrating how to mount and use the submodule with a local directory.

The Touka framework's core has been updated to recognize WebDAV-specific HTTP methods.
2025-12-10 13:37:11 +00:00
WJQSERVER
ee0ebc986c
Merge pull request #54 from infinite-iroha/dev
context added FileText method
2025-10-21 15:06:39 +08:00
wjqserver
e4aaaa1583 fix path to filepath 2025-10-21 15:06:26 +08:00
wjqserver
1361f6e237 update 2025-10-21 14:47:29 +08:00
WJQSERVER
a6458cca16
Merge pull request #53 from infinite-iroha/dev
update
2025-10-12 15:48:48 +08:00
wjqserver
76a89800a2 update 2025-10-12 15:47:02 +08:00
WJQSERVER
4955fb9d03
Merge pull request #52 from infinite-iroha/dev
fix StaticFS
2025-09-14 08:27:29 +08:00
wjqserver
5b98310de5 fix StaticFS 2025-09-14 08:24:01 +08:00
WJQSERVER
f1ac0dd6ff
Merge pull request #51 from infinite-iroha/dev
0.3.7
2025-09-10 02:40:51 +08:00
wjqserver
38ff5126e3 fix 2025-09-10 02:40:41 +08:00
WJQSERVER
b4e073ae2f
Update sse.go 2025-09-07 02:24:28 +08:00
WJQSERVER
af0a99acda add sse intn support 2025-09-06 17:55:45 +00:00
wjqserver
3ffde5742c add wanf 2025-08-20 16:50:26 +08:00
WJQSERVER
016df0efe4
Merge pull request #50 from infinite-iroha/dev
0.3.6
2025-08-01 10:27:01 +08:00
wjqserver
3590a77f90 fix reqip val 2025-08-01 10:23:49 +08:00
wjqserver
74f5770b42 update tree 2025-08-01 10:21:32 +08:00
WJQSERVER
0f4d90faeb
Merge pull request #49 from infinite-iroha/fix-router-panic
Fix router panic
2025-08-01 09:09:59 +08:00
wjqserver
783370fd79 update 2025-08-01 09:09:46 +08:00
wjqserver
295852e1a1 update reqip 2025-08-01 09:05:09 +08:00
wjqserver
99b48371b3 update test 2025-08-01 09:05:00 +08:00
google-labs-jules[bot]
e43b12e343 fix: correct shallow copy in router backtracking
The router could panic with a 'slice bounds out of range' error when handling requests that trigger its backtracking logic.

The root cause was a shallow copy of the node's `children` slice when creating a `skippedNode` for backtracking. This could lead to a corrupted state if the router needed to backtrack and then proceed down a wildcard path.

This commit fixes the issue by introducing a `copyChildren` method on the `node` struct, which creates a safe copy of the children slice. This method is now used when creating a `skippedNode`, ensuring that the backtracking logic is isolated and robust.
2025-08-01 00:49:53 +00:00
WJQSERVER
1e7682ad84
Merge pull request #48 from infinite-iroha/dev
add RunShutdownWithContext
2025-07-31 20:18:47 +08:00
wjqserver
3cd8ef84a2 add RunShutdownWithContext 2025-07-31 20:18:24 +08:00
WJQSERVER
2c60e84067
Merge pull request #46 from infinite-iroha/dev
0.3.4
2025-07-28 21:02:20 +08:00
wjqserver
895cd6222b update deps 2025-07-28 21:01:18 +08:00
wjqserver
c9b8e966c4 remove too much log print 2025-07-27 16:34:46 +08:00
WJQSERVER
dee05b048e
Merge pull request #45 from infinite-iroha/dev
update about
2025-07-27 16:07:33 +08:00
wjqserver
3e76566917 update about 2025-07-26 18:51:30 +08:00
WJQSERVER
ccf25dee46
Merge pull request #44 from infinite-iroha/dev
fix cfdt
2025-07-25 00:35:43 +08:00
WJQSERVER
1f0724af94
fix cfdt 2025-07-25 00:35:12 +08:00
WJQSERVER
e77fcb10d3
Merge pull request #43 from infinite-iroha/dev
add testflow
2025-07-24 16:41:14 +08:00
WJQSERVER
5e74fa011e
Merge pull request #42 from infinite-iroha/license-compliance
add MPL 2.0 license headers to all go files
2025-07-24 16:40:46 +08:00
wjqserver
de4bbe7959 add testflow 2025-07-24 16:39:48 +08:00
WJQSERVER
507e2f3813
Merge pull request #41 from infinite-iroha/dev
Dev
2025-07-24 16:09:09 +08:00
google-labs-jules[bot]
504089b748 feat: add MPL 2.0 license headers to all go files 2025-07-24 08:07:38 +00:00
wjqserver
5bb58ee6d3 add tree test 2025-07-24 15:39:17 +08:00
wjqserver
6b3f3335ab replace to iox 2025-07-18 17:40:01 +08:00
WJQSERVER
e10c20c5d6
Merge pull request #40 from infinite-iroha/dev
add Text
2025-07-18 15:30:20 +08:00
wjqserver
b06b4a227f update deps 2025-07-18 15:30:03 +08:00
wjqserver
ad167b6646 add Text 2025-07-18 15:26:43 +08:00
WJQSERVER
583609945e
Merge pull request #38 from infinite-iroha/dependabot/go_modules/github.com/WJQSERVER-STUDIO/httpc-0.8.1
Bump github.com/WJQSERVER-STUDIO/httpc from 0.8.0 to 0.8.1
2025-07-17 19:14:53 +08:00
WJQSERVER
18e7b203ec
Merge pull request #39 from infinite-iroha/dev
update deps
2025-07-17 19:14:16 +08:00
dependabot[bot]
e75619fc7a
Bump github.com/WJQSERVER-STUDIO/httpc from 0.8.0 to 0.8.1
Bumps [github.com/WJQSERVER-STUDIO/httpc](https://github.com/WJQSERVER-STUDIO/httpc) from 0.8.0 to 0.8.1.
- [Commits](https://github.com/WJQSERVER-STUDIO/httpc/compare/v0.8.0...v0.8.1)

---
updated-dependencies:
- dependency-name: github.com/WJQSERVER-STUDIO/httpc
  dependency-version: 0.8.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-17 01:13:22 +00:00