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

All addresses are now URIs that include the URI scheme #98

Merged
merged 1 commit into from
Apr 28, 2017

Conversation

clue
Copy link
Member

@clue clue commented Apr 28, 2017

This simple PR ensures that all addresses are now returned as URIs that include the URI scheme. This eases checking whether the connection is encrypted (tls:// scheme) and also eases parsing individual URI components as passing the string to parse_url() no longer requires an explicit scheme prefix.

This is in fact a BC break for anybody who previously relied on explicitly prefixing this, but actually eases parsing:

- $parts = parse_url('tcp://' . $conn->getRemoteAddress());
+ $parts = parse_url($conn->getRemoteAddress());

@clue clue added this to the v0.8.0 milestone Apr 28, 2017
@WyriHaximus WyriHaximus requested review from jsor and WyriHaximus April 28, 2017 17:20
Copy link
Member

@jsor jsor left a comment

Choose a reason for hiding this comment

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

Btw, the WHATWG will probably standardize on the term URL: https://url.spec.whatwg.org/#goals

@WyriHaximus
Copy link
Member

Still, them failing test though 😝

@clue
Copy link
Member Author

clue commented Apr 28, 2017

Rebased now that #97 is in to fix the failing tests :shipit:

@WyriHaximus
Copy link
Member

Awesome 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants