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

fixes #844 WebSocket wildcard host errors #1266

Merged
merged 1 commit into from
Jul 28, 2020
Merged

fixes #844 WebSocket wildcard host errors #1266

merged 1 commit into from
Jul 28, 2020

Conversation

gdamore
Copy link
Contributor

@gdamore gdamore commented Jul 26, 2020

fixes #1224 wss fails on IPV6 address

This fixes bugs and inconsistencies in the way addresses are
handled for HTTP (and consequently websocket). The Host:
address line needs to look at numeric IPs and treat wildcards
as if they are not specified, and needs to understand the IPv6
address format using brackets (e.g. [::1]:80).

@gdamore
Copy link
Contributor Author

gdamore commented Jul 26, 2020

Note also this uses IP address parsing to ensure that we cope with the various different yet equivalent ways of handling IP addresses. However v4mapped addresses might not behave properly.

@codecov
Copy link

codecov bot commented Jul 26, 2020

Codecov Report

Merging #1266 into master will decrease coverage by 0.43%.
The diff coverage is 63.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1266      +/-   ##
==========================================
- Coverage   80.97%   80.54%   -0.44%     
==========================================
  Files         118      118              
  Lines       19420    19519      +99     
==========================================
- Hits        15726    15722       -4     
- Misses       3694     3797     +103     
Impacted Files Coverage Δ
src/supplemental/http/http_server.c 68.95% <52.08%> (-0.79%) ⬇️
src/platform/posix/posix_resolv_gai.c 76.13% <71.66%> (-2.68%) ⬇️
src/core/platform.h 87.77% <100.00%> (+0.27%) ⬆️
src/supplemental/tcp/tcp.c 78.96% <100.00%> (ø)
src/supplemental/http/http_conn.c 79.89% <0.00%> (-3.27%) ⬇️
src/transport/ws/websocket.c 84.38% <0.00%> (-3.00%) ⬇️
src/core/aio.c 94.55% <0.00%> (-1.93%) ⬇️
src/transport/tcp/tcp.c 76.60% <0.00%> (-1.65%) ⬇️
src/supplemental/websocket/websocket.c 65.82% <0.00%> (-1.09%) ⬇️
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1669812...09d667c. Read the comment docs.

@gdamore
Copy link
Contributor Author

gdamore commented Jul 26, 2020

The code complexity stuff is annoying. There really isn't a great way to make that better.

fixes #1224 wss fails on IPV6 address

This fixes bugs and inconsistencies in the way addresses are
handled for HTTP (and consequently websocket).  The Host:
address line needs to look at numeric IPs and treat wildcards
as if they are not specified, and needs to understand the IPv6
address format using brackets (e.g. [::1]:80).
@gdamore gdamore merged commit 09d667c into master Jul 28, 2020
@gdamore gdamore deleted the http-v6 branch July 28, 2020 02:16
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.

wss fails on IPV6 address
1 participant