@@ -3091,13 +3091,13 @@ class HTTPClientTests: XCTestCase {
3091
3091
XCTAssertNoThrow ( try future. wait ( ) )
3092
3092
XCTAssertNil ( try delegate. next ( ) . wait ( ) )
3093
3093
}
3094
-
3094
+
3095
3095
func testResponseAccumulatorMaxBodySizeLimitExceedingWithContentLength( ) throws {
3096
3096
let httpBin = HTTPBin ( . http1_1( ssl: false , compress: false ) ) { _ in HTTPEchoHandler ( ) }
3097
3097
defer { XCTAssertNoThrow ( try httpBin. shutdown ( ) ) }
3098
-
3098
+
3099
3099
let body = ByteBuffer ( bytes: 0 ..< 11 )
3100
-
3100
+
3101
3101
var request = try Request ( url: httpBin. baseURL)
3102
3102
request. body = . byteBuffer( body)
3103
3103
let delegate = ResponseAccumulator ( request: request)
@@ -3109,13 +3109,13 @@ class HTTPClientTests: XCTestCase {
3109
3109
XCTAssertTrue ( error is ResponseAccumulator . ResponseTooBigError , " unexpected error \( error) " )
3110
3110
}
3111
3111
}
3112
-
3112
+
3113
3113
func testResponseAccumulatorMaxBodySizeLimitNotExceedingWithContentLength( ) throws {
3114
3114
let httpBin = HTTPBin ( . http1_1( ssl: false , compress: false ) ) { _ in HTTPEchoHandler ( ) }
3115
3115
defer { XCTAssertNoThrow ( try httpBin. shutdown ( ) ) }
3116
-
3116
+
3117
3117
let body = ByteBuffer ( bytes: 0 ..< 10 )
3118
-
3118
+
3119
3119
var request = try Request ( url: httpBin. baseURL)
3120
3120
request. body = . byteBuffer( body)
3121
3121
let delegate = ResponseAccumulator ( request: request)
@@ -3124,16 +3124,16 @@ class HTTPClientTests: XCTestCase {
3124
3124
request: request,
3125
3125
delegate: delegate
3126
3126
) . wait ( )
3127
-
3127
+
3128
3128
XCTAssertEqual ( response. body, body)
3129
3129
}
3130
-
3130
+
3131
3131
func testResponseAccumulatorMaxBodySizeLimitExceedingWithTransferEncodingChuncked( ) throws {
3132
3132
let httpBin = HTTPBin ( . http1_1( ssl: false , compress: false ) ) { _ in HTTPEchoHandler ( ) }
3133
3133
defer { XCTAssertNoThrow ( try httpBin. shutdown ( ) ) }
3134
-
3134
+
3135
3135
let body = ByteBuffer ( bytes: 0 ..< 11 )
3136
-
3136
+
3137
3137
var request = try Request ( url: httpBin. baseURL)
3138
3138
request. body = . stream { writer in
3139
3139
writer. write ( . byteBuffer( body) )
@@ -3147,13 +3147,13 @@ class HTTPClientTests: XCTestCase {
3147
3147
XCTAssertTrue ( error is ResponseAccumulator . ResponseTooBigError , " unexpected error \( error) " )
3148
3148
}
3149
3149
}
3150
-
3150
+
3151
3151
func testResponseAccumulatorMaxBodySizeLimitNotExceedingWithTransferEncodingChuncked( ) throws {
3152
3152
let httpBin = HTTPBin ( . http1_1( ssl: false , compress: false ) ) { _ in HTTPEchoHandler ( ) }
3153
3153
defer { XCTAssertNoThrow ( try httpBin. shutdown ( ) ) }
3154
-
3154
+
3155
3155
let body = ByteBuffer ( bytes: 0 ..< 10 )
3156
-
3156
+
3157
3157
var request = try Request ( url: httpBin. baseURL)
3158
3158
request. body = . stream { writer in
3159
3159
writer. write ( . byteBuffer( body) )
@@ -3164,7 +3164,7 @@ class HTTPClientTests: XCTestCase {
3164
3164
request: request,
3165
3165
delegate: delegate
3166
3166
) . wait ( )
3167
-
3167
+
3168
3168
XCTAssertEqual ( response. body, body)
3169
3169
}
3170
3170
0 commit comments