-
Notifications
You must be signed in to change notification settings - Fork 103
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
rfc7230: Port number in Host header when not std. #132
Open
dominicletz
wants to merge
42
commits into
Azolo:master
Choose a base branch
from
witchtails:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
and skip ssl tests that fails in the v0.4.3 code
…to :inet.ip_address()
According to [this article](https://www.lob.com/blog/websocket-org-is-down-here-is-an-alternative) the server at `echo.websocket.org` was shut down in 2021. The author provides an alternative echo server URL, used here. See also [this Elixir forum thread](https://elixirforum.com/t/matcherror-no-match-of-right-hand-side-value-error-websockex-requesterror-code-200-message-ok/51900) where the issue was originally reported.
Merge this fork
Adding tcp options
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I ran into a problem of getting a "Forbidden" return on a
ws://localhost:9944
service when using websockex while connecting with wscat worked fine. After inspecting the wire communication withtcpdump
I found that wscat was always sending the port number in the communication:Host: localhost:9944
while websockex did not include it and just submittedHost: localhost
-- The service was checking that hostname and did not allow any connections not matching the hostname + port.After checking rfc7230 on this it seems appending the port number is in fact the right thing to do when the port number is different from the default port of the scheme (http/ws=80 and https/wss=443).
This patch fixes the issue and gets us nearer to rfc7230 conformance.