Skip to content

Commit

Permalink
Use non-deprecated configureHTTP2SecureUpgrade. (vapor#2261)
Browse files Browse the repository at this point in the history
* Use non-deprecated configureHTTP2SecureUpgrade.

* Require nio-http2 1.11.0.
  • Loading branch information
jshier authored and pull[bot] committed Mar 24, 2020
1 parent bc1a882 commit cf454ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ let package = Package(
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.4.1"),

// HTTP/2 support for SwiftNIO
.package(url: "https://github.com/apple/swift-nio-http2.git", from: "1.5.0"),
.package(url: "https://github.com/apple/swift-nio-http2.git", from: "1.11.0"),

// Useful code around SwiftNIO.
.package(url: "https://github.com/apple/swift-nio-extras.git", from: "1.0.0"),
Expand Down
6 changes: 3 additions & 3 deletions Sources/Vapor/Server/HTTPServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ private final class HTTPServerConnection {
return channel.close(mode: .all)
}
return channel.pipeline.addHandler(tlsHandler).flatMap { _ in
return channel.pipeline.configureHTTP2SecureUpgrade(h2PipelineConfigurator: { pipeline in
return channel.configureHTTP2SecureUpgrade(h2ChannelConfigurator: { channel in
return channel.configureHTTP2Pipeline(
mode: .server,
inboundStreamStateInitializer: { (channel, streamID) in
Expand All @@ -271,8 +271,8 @@ private final class HTTPServerConnection {
)
}
).map { _ in }
}, http1PipelineConfigurator: { pipeline in
return pipeline.addVaporHTTP1Handlers(
}, http1ChannelConfigurator: { channel in
return channel.pipeline.addVaporHTTP1Handlers(
application: application!,
responder: responder,
configuration: configuration
Expand Down

0 comments on commit cf454ff

Please sign in to comment.