ChannelHandler: provide static (un)wrap(In|Out)bound(In|Out) (#2791)

This commit is contained in:
Johannes Weiss authored and GitHub committed 2024-07-18 11:55:48 +01:00
1 parent 223b0e8eac
commit 7948ed2104
72 files changed
+369 -343

No files matched your search

+2 -2
View File
@@ -29,7 +29,7 @@ public final class NIOHTTPRequestHeadersValidator: ChannelOutboundHandler, Remov
public init() { }
public func write(context: ChannelHandlerContext, data: NIOAny, promise: EventLoopPromise<Void>?) {
switch self.unwrapOutboundIn(data) {
switch Self.unwrapOutboundIn(data) {
case .head(let head):
guard head.headers.areValidToSend else {
promise?.fail(HTTPParserError.invalidHeaderToken)
@@ -67,7 +67,7 @@ public final class NIOHTTPResponseHeadersValidator: ChannelOutboundHandler, Remo
public init() { }
public func write(context: ChannelHandlerContext, data: NIOAny, promise: EventLoopPromise<Void>?) {
switch self.unwrapOutboundIn(data) {
switch Self.unwrapOutboundIn(data) {
case .head(let head):
guard head.headers.areValidToSend else {
promise?.fail(HTTPParserError.invalidHeaderToken)