Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Percent encoding and Punycode support for plain URLs #2624

Merged
merged 2 commits into from
Nov 5, 2021
Merged

Percent encoding and Punycode support for plain URLs #2624

merged 2 commits into from
Nov 5, 2021

Conversation

mkykadir
Copy link
Contributor

@mkykadir mkykadir commented Oct 19, 2021

Fixes #2618 and Fixes #492

Now plain http://hello-🌍.com/🖐 input is valid for URL
Note: Variable names are chosen to match with pseudo-codes in RFC3492

  • Ctor for string input of URL is extended with boolean parameter which specifies if string is already an encoded input (default)
  • parsePlain static method is added to parse plain inputs
  • Path, query and achor is percent encoded for plain inputs
  • Subdomains and domain are puny encoded for plain inputs

Copy link
Contributor

@Geod24 Geod24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to read the spec, did a first pass for obvious things.

inet/vibe/inet/url.d Show resolved Hide resolved
inet/vibe/inet/url.d Show resolved Hide resolved
inet/vibe/inet/url.d Outdated Show resolved Hide resolved
inet/vibe/inet/url.d Outdated Show resolved Hide resolved
inet/vibe/inet/url.d Outdated Show resolved Hide resolved
inet/vibe/inet/url.d Show resolved Hide resolved
inet/vibe/inet/url.d Show resolved Hide resolved
inet/vibe/inet/url.d Outdated Show resolved Hide resolved
Copy link
Contributor

@Geod24 Geod24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just fix the commit and rebase, and will merge.

@Geod24 Geod24 enabled auto-merge November 5, 2021 09:48
@Geod24 Geod24 merged commit c4aa889 into vibe-d:master Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Encoding URL string in URL Add support of Punycode
2 participants