mirror of
https://github.com/apple/swift-nio
synced 2026-11-30 05:28:44 +00:00
Let Upgrade handler remove other HTTP handlers. (#144)
Motivation: The HTTP pipeline may contain other HTTP protocol specific handlers, beyond just the ones that the upgrade handler knows explicitly. It should be possible to get the upgrade handler to remove those at the right time. Modifications: Add extra support for removing handlers. Result: It'll be possible for the HTTP upgrade logic to remove things like the pipelining handler at upgrade time.
This commit is contained in:
1 parent
25dd80aa9f
commit
79a87ab76a
3 files changed
+131
-105
No files matched your search
@@ -153,7 +153,7 @@ public extension ChannelPipeline {
|
||||
let requestDecoder = HTTPRequestDecoder()
|
||||
let upgrader = HTTPServerUpgradeHandler(upgraders: upgraders,
|
||||
httpEncoder: responseEncoder,
|
||||
httpDecoder: requestDecoder,
|
||||
extraHTTPHandlers: [requestDecoder],
|
||||
upgradeCompletionHandler: upgradeCompletionHandler)
|
||||
return addHandlers(responseEncoder, requestDecoder, upgrader, first: first)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user