Files
swift-nio-extras/Tests/NIOHTTPCompressionTests/HTTPRequestCompressorTest+XCTest.swift
Adam Fowler 020e322a65 Added NIOHTTPRequestCompressor to compress requests (#88)
* 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
2020-04-30 17:28:49 +01:00

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),
]
}
}