Skip to content

Commit

Permalink
swift format
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Jun 10, 2024
1 parent 2a76b9f commit 63c7b43
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Sources/Hummingbird/Server/RequestContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@ public struct ServerRequestContextSource: RequestContextSource {

public let channel: Channel
public let logger: Logger
public var allocator: ByteBufferAllocator { channel.allocator }
public var allocator: ByteBufferAllocator { self.channel.allocator }
}

/// Protocol for a request context that can be created from a NIO Channel
public protocol RequestContext: BaseRequestContext where Source == ServerRequestContextSource {
}
public protocol RequestContext: BaseRequestContext where Source == ServerRequestContextSource {}

/// Implementation of a basic request context that supports everything the Hummingbird library needs
public struct BasicRequestContext: RequestContext {
Expand Down
6 changes: 3 additions & 3 deletions Sources/HummingbirdCore/Server/HTTP/HTTP1Channel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ public struct HTTP1Channel: ServerChildChannel, HTTPChannelHandler {
public func setup(channel: Channel, logger: Logger) -> EventLoopFuture<Value> {
let childChannelHandlers: [any ChannelHandler] =
[HTTP1ToHTTPServerCodec(secure: false)] + self.additionalChannelHandlers() + [
HTTPUserEventHandler(logger: logger)
HTTPUserEventHandler(logger: logger),
]
return channel.eventLoop.makeCompletedFuture {
try channel.pipeline.syncOperations.configureHTTPServerPipeline(
withPipeliningAssistance: false, // HTTP is pipelined by NIOAsyncChannel
withPipeliningAssistance: false, // HTTP is pipelined by NIOAsyncChannel
withErrorHandling: true,
withOutboundHeaderValidation: false // Swift HTTP Types are already doing this validation
withOutboundHeaderValidation: false // Swift HTTP Types are already doing this validation
)
try channel.pipeline.syncOperations.addHandlers(childChannelHandlers)
return try NIOAsyncChannel(
Expand Down

0 comments on commit 63c7b43

Please sign in to comment.