mirror of
https://github.com/apple/swift-nio-extras
synced 2026-11-26 04:57:49 +00:00
* Added NIOHTTPRequestCompressor to compress requests Also moved common code from request and response compressor into separate NIOHTTPCompression enum. * Updates after comments from @weissi Also reinstated public enum HTTPResponseCompressor.CompressionError * algorithms are now let not var * Catch situation where head is flushed before anything else comes through Content-encoding was not being set Added additional tests for header values * Added documentation around 5 bytes added to buffer size and add them * Renaming NIOHTTPCompressionSetting to NIOCompression Also NIOHTTPCompressionSetting.CompressionAlgorithm is NIOCompression.Algorithm NIOHTTPCompressionSetting.CompressionError is NIOCompression.Error Algorithm now conforms to Equatable * Forgot to run generate_linux_tests * Fix typos
43 lines
1.5 KiB
Swift
43 lines
1.5 KiB
Swift
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This source file is part of the SwiftNIO open source project
|
|
//
|
|
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
|
|
// Licensed under Apache License v2.0
|
|
//
|
|
// See LICENSE.txt for license information
|
|
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// HTTPRequestCompressorTest+XCTest.swift
|
|
//
|
|
import XCTest
|
|
|
|
///
|
|
/// NOTE: This file was generated by generate_linux_tests.rb
|
|
///
|
|
/// Do NOT edit this file directly as it will be regenerated automatically when needed.
|
|
///
|
|
|
|
extension HTTPRequestCompressorTest {
|
|
|
|
static var allTests : [(String, (HTTPRequestCompressorTest) -> () throws -> Void)] {
|
|
return [
|
|
("testGzipContentEncoding", testGzipContentEncoding),
|
|
("testDeflateContentEncoding", testDeflateContentEncoding),
|
|
("testOneBuffer", testOneBuffer),
|
|
("testMultipleBuffers", testMultipleBuffers),
|
|
("testMultipleBuffersDeflate", testMultipleBuffersDeflate),
|
|
("testMultipleBuffersWithFlushes", testMultipleBuffersWithFlushes),
|
|
("testFlushAfterHead", testFlushAfterHead),
|
|
("testFlushBeforeEnd", testFlushBeforeEnd),
|
|
("testDoubleFlush", testDoubleFlush),
|
|
("testNoBody", testNoBody),
|
|
]
|
|
}
|
|
}
|
|
|