-
Notifications
You must be signed in to change notification settings - Fork 625
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
Failed WebSocket upgrade does not consume initial request .end
part
#2632
Comments
Should the server be closing the channel at this point? |
I will take a look. Thanks for filing this! |
Additional information. If your |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
When a HTTP channel is configured with a
NIOTypedWebSocketServerUpgrader
WebSocket upgrade and a connection fails becauseshouldUpgrade
returnednil
the upgrade process should consume all parts of the initial request.Actual behavior
The
.end
part is passed onto the HTTP channel pipeline, confusing HTTP request processing as the first part it receives is not a.head
.Steps to reproduce
This can be easily reproduced using the WebSocket samples that come with SwiftNIO
shouldUpgrade
closure ofNIOTypedWebSocketServerUpgrader
in NIOWebSocketServer/Server.swift:82 to berequestPart
.SwiftNIO version/commit hash
Swift version 5.10-dev (LLVM e8e5be8d5b39f46, Swift 99e9db868aefd99)
Target: x86_64-unknown-linux-gnu
The text was updated successfully, but these errors were encountered: