Skip to content

Conversation

@hubertshelley
Copy link
Member

背景: 在路由 oauth2/applications 下, GET /oauth2/applications 返回 405。

修复: 调整 SpecialPath::String 匹配逻辑, 当 local_path 为空时不再匹配, 避免 DFS 误入 id:str 子节点覆盖父节点处理器。

测试: 新增单元测试 oauth2_applications_get_should_not_405, 覆盖 GET /oauth2/applications 正常返回场景。cargo test 全部通过。

文档: 新增 docs/requirements/routing-oauth2-405.md, 记录问题背景、根因、修复要点与验收。

修复 SpecialPath::String 在空路径段下的误匹配,避免 DFS 误入  子节点覆盖父节点处理器,导致 405。调整为当 local_path 为空时不匹配。

同时新增单元测试:GET /oauth2/applications 命中父节点 GET 处理器;并补充需求文档 docs/requirements/routing-oauth2-405.md。
描述问题背景、根因、修复要点与验收标准,便于后续追踪。
@hubertshelley hubertshelley merged commit ca34b4e into main Aug 27, 2025
1 check passed
@hubertshelley hubertshelley deleted the fix/route-405-oauth2-applications branch August 27, 2025 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants