Skip to content

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

Merged
WyriHaximus merged 1 commit into
reactphp:masterfrom
clue-labs:uri
Apr 28, 2017
Merged

All addresses are now URIs that include the URI scheme#98
WyriHaximus merged 1 commit into
reactphp:masterfrom
clue-labs:uri

Conversation

@clue

@clueclue commented Apr 28, 2017

Copy link
Copy Markdown
Member

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());

@jsorjsor left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

Still, them failing test though 😝

@clue

clue commented Apr 28, 2017

Copy link
Copy Markdown
MemberAuthor

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

@WyriHaximus

Copy link
Copy Markdown
Member

Awesome 👍

Sign up for freeto 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

@clue@WyriHaximus@jsor