-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2.x.x request decompression, response compression middleware (#10)
* Comment everything out, sort Package.swift * HBRequestDecompressionMiddleware * Request decompression middleware * ResponseCompressionMiddleware * Renaming, moving code about * Response compression headers * Added configuration to middleware * Remove old files * Verify compression window sizes * Update CI * Use compress-nio 1.2.1 * Use deflate in some of the tests * Update README * Changes from PR comments * Throw badRequest on corrupt data * Add another bad data test * Print error to logger when inflate/deflate init/finish fails It should never fail, but if it does we have some output * Fix test, we need to check contentEncoding header
- Loading branch information
1 parent
50d9593
commit acd628c
Showing
11 changed files
with
628 additions
and
898 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,28 @@ | ||
// swift-tools-version:5.5 | ||
// swift-tools-version:5.9 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "hummingbird-compression", | ||
platforms: [.iOS(.v12), .tvOS(.v12)], | ||
platforms: [.macOS(.v14), .iOS(.v17), .tvOS(.v17)], | ||
products: [ | ||
.library(name: "HummingbirdCompression", targets: ["HummingbirdCompression"]), | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "1.0.0"), | ||
.package(url: "https://github.com/adam-fowler/compress-nio.git", from: "1.0.0"), | ||
.package(url: "https://github.com/hummingbird-project/hummingbird.git", branch: "main"), | ||
.package(url: "https://github.com/adam-fowler/compress-nio.git", from: "1.2.1"), | ||
.package(url: "https://github.com/apple/swift-nio.git", from: "2.32.1"), | ||
], | ||
targets: [ | ||
.target(name: "HummingbirdCompression", dependencies: [ | ||
.product(name: "Hummingbird", package: "hummingbird"), | ||
.product(name: "NIO", package: "swift-nio"), | ||
.product(name: "NIOHTTP1", package: "swift-nio"), | ||
.product(name: "NIOPosix", package: "swift-nio"), | ||
.product(name: "CompressNIO", package: "compress-nio"), | ||
]), | ||
.testTarget(name: "HummingbirdCompressionTests", dependencies: [ | ||
.byName(name: "HummingbirdCompression"), | ||
.product(name: "HummingbirdXCT", package: "hummingbird"), | ||
.product(name: "HummingbirdTesting", package: "hummingbird"), | ||
]), | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 0 additions & 58 deletions
58
Sources/HummingbirdCompression/Application+Compression.swift
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
Sources/HummingbirdCompression/HTTPServer+Compression.swift
This file was deleted.
Oops, something went wrong.
221 changes: 0 additions & 221 deletions
221
Sources/HummingbirdCompression/RequestDecompression.swift
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.