feat: A `username` method for `Authority`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.4k
- Forks
- 378
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 5
Description
A function to extract usernames from Uris/Authoritys would be super userful. E.g.:
/// Returns None if there is no `@` in the authority section.
fn (self: Authority) -> Option<&str>
The docs for http::uri::Uri::authority mention:
The authority also includes a username:password component, however the use of this is deprecated and should be avoided.
However, I can't find any reference to this being deprecated anywhere. rfc6764 is still current and expects this format to be used in the context of caldav and carddav (which is just xml over http). rfc6068 also still uses this, albeit in the context of email.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Authority type and the Uri::authority API mentioned in the issue, including how the authority section represents username:password. Define the expected behavior for extracting the username, especially when no @ is present, and add coverage for the resulting Authority method before running the relevant Rust tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100