Repository navigation
fix(cli): 修复配置诊断对 HTTP(S) 协议大小写的误判 - #6819
Merged
Merged
Conversation
Use an ASCII-lowercase copy only for scheme validation; preserve the original endpoint, including case-sensitive path and query values. Verified with an offline CLI build and five direct CLI cases: four HTTP(S) spellings accepted, GOPHER rejected, and every config file unchanged. The unmodified binary rejected the same uppercase HTTPS fixture.
Keep the contributor CLI source and history unchanged. The unchanged credit validator passed over the original contributor history plus exact upstream format merge; scoped child_env rustfmt passed. Hosted CI remains separate and pending. Signed-off-by: Hunter B <hmbown@gmail.com>
Regenerate the existing root-to-crate slice; only the reviewed contributor credit line is added. The previous focused credit/format checks missed this derived-file contract; new-head CI Version drift exposed it before credit. Canonical generator check and unchanged contributor-credit checker (v0.10.0) are validated on this exact proposed commit. Hosted CI remains separate; no test-matrix pass is claimed. Signed-off-by: Hunter B <hmbown@gmail.com>
Hmbown
pushed a commit
that referenced
this pull request
Oct 3, 2026
Retain the real main parent 296c05d and the original PR merge/commit ancestry for #6819 (@Guan0923), #6829 and #6831 (@Lstarsky0), and #6830 (@SparkofSpike). Resolve the 19 reviewed counterparts to the exact V22 product tree, including all 156 original translated values and the original localization regression test. Exact V22 local checks: Rust 1351/0/0; localization 54/0/0; CI-policy Clippy PASS. CLI: 3 actual processes / 6 checks / 6 local fixture requests / 0 paid calls; approval, resume, cancellation and EOF effects passed. npm test + check:web: 1180 passed / 0 failed / 7 explicit skips (wrapper101, SDK19, host378, website682); strict TypeScript and production web passed. No contributor harvesting, runtime default flip, install or release claim. Signed-off-by: CodeWhale Bot <bot@codewhale.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
问题
config doctor使用区分大小写的字符串前缀判断服务地址是否采用 HTTP 或 HTTPS 协议。因此,使用大写或混合大小写协议的地址,例如:
会被错误地报告为非 HTTP(S) 地址,命令退出码为 1。
HTTP(S) 协议名称不区分大小写,不应仅因为协议使用大写而拒绝该配置。
修改
在原有检查中,对用于判断的临时字符串执行
to_ascii_lowercase(),再检查http://和https://前缀。验证
已完成本地离线编译,并通过实际 CLI 调用验证。
修复前,同一条
HTTPS://…配置被拒绝,退出码为 1;修复后通过,退出码为 0。http://HTTP://HTTPS://hTtPs://GOPHER://另外,通过
config get providers.deepseek.base_url确认原始地址保持不变,包括/API?Token=AbC的大小写。上述五个案例的配置文件均未被改写。No-Issue: standalone config-doctor HTTP(S) scheme-case bug fix with a reproduction in this PR.