akka/akka-http
在 GitHub 查看Uri.Path() is ambiguous about accepting % encoded vs not encoded
Open
#2,577 创建于 2019年6月25日
1 - triageddiscusshelp wantedt:coret:docst:model
仓库指标
- Star
- (1,311 star)
- PR 合并指标
- (平均合并 1天 10小时) (30 天内合并 2 个 PR)
描述
If you put characters that should be percent-encoded in a string passed to Uri.Path(), it will automatically percent-encode them (e.g. turn a space into %20). Unless the character itself is a percent, in which case it assumes you are trying to percent encode this. I guess this is sort of by design, but the ambiguity definitely can create bugs. Ideally there'd be two variants you could pass to, one that expected unencoded input and encoded everything (including %), and another that expects encoded input and rejects characters that need to be percent-encoded.