fix(route): 修复字符串路径段空匹配导致 /oauth2/applications 返回405 #128
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
背景: 在路由 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, 记录问题背景、根因、修复要点与验收。