@@ -55,7 +55,7 @@ final class Test_Server: XCTestCase {
5555 response. headerFields,
5656 [
5757 . init( " My-Response-UUID " ) !: " abcd " , . init( " My-Tracing-Header " ) !: " 1234 " ,
58- . contentType: " application/json; charset=utf-8 " ,
58+ . contentType: " application/json; charset=utf-8 " , . contentLength : " 47 " ,
5959 ]
6060 )
6161 let bodyString : String
@@ -87,7 +87,7 @@ final class Test_Server: XCTestCase {
8787 . init( )
8888 )
8989 XCTAssertEqual ( response. status. code, 400 )
90- XCTAssertEqual ( response. headerFields, [ . contentType: " application/json; charset=utf-8 " ] )
90+ XCTAssertEqual ( response. headerFields, [ . contentType: " application/json; charset=utf-8 " , . contentLength : " 40 " ] )
9191 try await XCTAssertEqualStringifiedData (
9292 responseBody,
9393 #"""
@@ -131,7 +131,10 @@ final class Test_Server: XCTestCase {
131131 XCTAssertEqual ( response. status. code, 201 )
132132 XCTAssertEqual (
133133 response. headerFields,
134- [ . init( " X-Extra-Arguments " ) !: #"{"code":1}"# , . contentType: " application/json; charset=utf-8 " ]
134+ [
135+ . init( " X-Extra-Arguments " ) !: #"{"code":1}"# , . contentType: " application/json; charset=utf-8 " ,
136+ . contentLength: " 35 " ,
137+ ]
135138 )
136139 try await XCTAssertEqualStringifiedData (
137140 responseBody,
@@ -169,7 +172,7 @@ final class Test_Server: XCTestCase {
169172 XCTAssertEqual ( response. status. code, 400 )
170173 XCTAssertEqual (
171174 response. headerFields,
172- [ . init( " X-Reason " ) !: " bad%20luck " , . contentType: " application/json; charset=utf-8 " ]
175+ [ . init( " X-Reason " ) !: " bad%20luck " , . contentType: " application/json; charset=utf-8 " , . contentLength : " 16 " ]
173176 )
174177 try await XCTAssertEqualStringifiedData (
175178 responseBody,
@@ -270,7 +273,10 @@ final class Test_Server: XCTestCase {
270273 XCTAssertEqual ( response. status. code, 201 )
271274 XCTAssertEqual (
272275 response. headerFields,
273- [ . init( " X-Extra-Arguments " ) !: #"{"code":1}"# , . contentType: " application/json; charset=utf-8 " ]
276+ [
277+ . init( " X-Extra-Arguments " ) !: #"{"code":1}"# , . contentType: " application/json; charset=utf-8 " ,
278+ . contentLength: " 35 " ,
279+ ]
274280 )
275281 try await XCTAssertEqualStringifiedData (
276282 responseBody,
@@ -363,7 +369,7 @@ final class Test_Server: XCTestCase {
363369 . init( pathParameters: [ " petId " : " 1 " ] )
364370 )
365371 XCTAssertEqual ( response. status. code, 400 )
366- XCTAssertEqual ( response. headerFields, [ . contentType: " application/json; charset=utf-8 " ] )
372+ XCTAssertEqual ( response. headerFields, [ . contentType: " application/json; charset=utf-8 " , . contentLength : " 26 " ] )
367373 try await XCTAssertEqualStringifiedData (
368374 responseBody,
369375 #"""
@@ -386,7 +392,7 @@ final class Test_Server: XCTestCase {
386392 . init( )
387393 )
388394 XCTAssertEqual ( response. status. code, 200 )
389- XCTAssertEqual ( response. headerFields, [ . contentType: " application/json; charset=utf-8 " ] )
395+ XCTAssertEqual ( response. headerFields, [ . contentType: " application/json; charset=utf-8 " , . contentLength : " 17 " ] )
390396 try await XCTAssertEqualStringifiedData (
391397 responseBody,
392398 #"""
@@ -421,7 +427,7 @@ final class Test_Server: XCTestCase {
421427 . init( )
422428 )
423429 XCTAssertEqual ( response. status. code, 200 )
424- XCTAssertEqual ( response. headerFields, [ . contentType: " text/plain " ] )
430+ XCTAssertEqual ( response. headerFields, [ . contentType: " text/plain " , . contentLength : " 10 " ] )
425431 try await XCTAssertEqualStringifiedData (
426432 responseBody,
427433 #"""
@@ -482,7 +488,7 @@ final class Test_Server: XCTestCase {
482488 . init( )
483489 )
484490 XCTAssertEqual ( response. status. code, 200 )
485- XCTAssertEqual ( response. headerFields, [ . contentType: " text/plain " ] )
491+ XCTAssertEqual ( response. headerFields, [ . contentType: " text/plain " , . contentLength : " 10 " ] )
486492 try await XCTAssertEqualStringifiedData (
487493 responseBody,
488494 #"""
@@ -509,7 +515,7 @@ final class Test_Server: XCTestCase {
509515 . init( )
510516 )
511517 XCTAssertEqual ( response. status. code, 200 )
512- XCTAssertEqual ( response. headerFields, [ . contentType: " text/plain " ] )
518+ XCTAssertEqual ( response. headerFields, [ . contentType: " text/plain " , . contentLength : " 10 " ] )
513519 try await XCTAssertEqualStringifiedData (
514520 responseBody,
515521 #"""
@@ -530,7 +536,7 @@ final class Test_Server: XCTestCase {
530536 . init( )
531537 )
532538 XCTAssertEqual ( response. status. code, 200 )
533- XCTAssertEqual ( response. headerFields, [ . contentType: " application/octet-stream " ] )
539+ XCTAssertEqual ( response. headerFields, [ . contentType: " application/octet-stream " , . contentLength : " 10 " ] )
534540 try await XCTAssertEqualStringifiedData (
535541 responseBody,
536542 #"""
@@ -674,7 +680,7 @@ final class Test_Server: XCTestCase {
674680 . init( pathParameters: [ " petId " : " 1 " ] )
675681 )
676682 XCTAssertEqual ( response. status. code, 200 )
677- XCTAssertEqual ( response. headerFields, [ . contentType: " application/octet-stream " ] )
683+ XCTAssertEqual ( response. headerFields, [ . contentType: " application/octet-stream " , . contentLength : " 4 " ] )
678684 try await XCTAssertEqualStringifiedData ( responseBody, Data . efghString)
679685 }
680686
@@ -711,7 +717,7 @@ final class Test_Server: XCTestCase {
711717 . init( pathParameters: [ " petId " : " 1 " ] )
712718 )
713719 XCTAssertEqual ( response. status. code, 200 )
714- XCTAssertEqual ( response. headerFields, [ . contentType: " application/octet-stream " ] )
720+ XCTAssertEqual ( response. headerFields, [ . contentType: " application/octet-stream " , . contentLength : " 4 " ] )
715721 try await XCTAssertEqualStringifiedData ( responseBody, Data . abcdString)
716722 let sizes = await chunkSizeCollector. sizes
717723 XCTAssertEqual ( sizes, [ 4 ] )
@@ -736,7 +742,7 @@ final class Test_Server: XCTestCase {
736742 . init( pathParameters: [ " petId " : " 1 " ] )
737743 )
738744 XCTAssertEqual ( response. status. code, 412 )
739- XCTAssertEqual ( response. headerFields, [ . contentType: " application/json; charset=utf-8 " ] )
745+ XCTAssertEqual ( response. headerFields, [ . contentType: " application/json; charset=utf-8 " , . contentLength : " 6 " ] )
740746 try await XCTAssertEqualStringifiedData ( responseBody, Data . quotedEfghString)
741747 }
742748
@@ -759,7 +765,7 @@ final class Test_Server: XCTestCase {
759765 . init( pathParameters: [ " petId " : " 1 " ] )
760766 )
761767 XCTAssertEqual ( response. status. code, 500 )
762- XCTAssertEqual ( response. headerFields, [ . contentType: " text/plain " ] )
768+ XCTAssertEqual ( response. headerFields, [ . contentType: " text/plain " , . contentLength : " 4 " ] )
763769 try await XCTAssertEqualStringifiedData ( responseBody, Data . efghString)
764770 }
765771
0 commit comments