Skip to content

Converts "wss" scheme into "https" scheme#87

Merged
mbonneau merged 2 commits intoratchetphp:masterfrom
claudiosdc:Fix
Jan 1, 2019
Merged

Converts "wss" scheme into "https" scheme#87
mbonneau merged 2 commits intoratchetphp:masterfrom
claudiosdc:Fix

Conversation

@claudiosdc
Copy link
Contributor

Converts "wss" scheme into "https" scheme instead of always using "http" scheme and does not add unnecessary default ports when generating request.

…tp" scheme and does not add unnecessary default ports when generating request.
@claudiosdc
Copy link
Contributor Author

I was having a hard time connecting to a WebSocket service (Catenis notifications) and realized that it was due to the fact that the original WebSocket URI (wss://sandbox.catenis.io/..) was getting converted to an HTTP URI (http://sandbox.catenis.io:443/...) instead of to an HTTPS URI (https://sandbox.catenis.io/...) with no port appended to the host name.

Applying this fix solved the issue.

@clue
Copy link
Member

clue commented Dec 31, 2018

@claudiosdc Thank you, I agree that this change makes sense! 👍

Can you add a test for this to ensure this actually returns the expected request (the scheme is case-insenstive by definition, but all uppercase still looks strange to me) and also to ensure this doesn't break again in the future? 👍

@claudiosdc
Copy link
Contributor Author

@clue Added corresponding unit test as per your request.

I hope you guys can generate an updated version of this package including this fix any time soon.

@mbonneau mbonneau merged commit 0aaacb8 into ratchetphp:master Jan 1, 2019
@mbonneau
Copy link
Member

mbonneau commented Jan 1, 2019

@claudiosdc Thanks for the update and the tests!

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.

3 participants