Convenience methods to create URL authority from its parts
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- rust
- 领域
- api, networking
调研方向
首先定位 Authority 解析的实现,以及现有的构造或解析测试。检查当前如何转换主机和端口对,包括 IPv6 的处理。完成后,应提供一种有文档说明的便捷转换方式,能够从分开的主机和端口值进行转换,而不要求调用方自行格式化 Authority 字符串。
由索引模型根据 Issue 内容生成。
描述
Currently, the only way to build an Authority object is to parse a string in the form <host>:<port>. This can be a bit inconvenient: In the case the host is an ipv6 address, it needs to be enclosed in [], and the developer will have to do a somewhat complex dance to go from a Host/Port pair to a proper authority string.
It'd be nice to have additional convenience methods, e.g.
// From a host and a port
impl TryFrom<(&str, u16)> for Authority {}
This way, if &str is an IPv6 address (which can be detected by trying to parse it with Ipv6Addr::parse), it can automatically be bracketed.
- 主要语言
- Rust
- 星标
- 1.4k
- 派生
- 385
- 平均合并
- 1 天 5 小时
- 30 天内合并 PR
- 2
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
hyperium/http 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 3/5 1-2 天 新手友好度 52/100
-
难度 4/5 3-5 天 新手友好度 45/100
-
难度 3/5 1-2 天 新手友好度 62/100
-
难度 3/5 1-2 天 新手友好度 58/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
521xueweihan/HelloGitHub#4023 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
cloudflare/pingora#1055 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复