Commit graph

4 commits

Author SHA1 Message Date
wjqserver
74f5770b42 update tree 2025-08-01 10:21:32 +08:00
wjqserver
783370fd79 update 2025-08-01 09:09:46 +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
484f2f016b init(v0.0.1) 2025-05-28 18:25:28 +08:00