Skip to content

Commit 6a6fd09

Browse files
committed
Code review
1 parent 901f2ae commit 6a6fd09

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

Diff for: Sources/AsyncHTTPClient/ConnectionPool/RequestFramingMetadata.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
struct RequestFramingMetadata: Equatable {
16-
enum Body: Equatable {
15+
struct RequestFramingMetadata: Hashable {
16+
enum Body: Hashable {
1717
case none
1818
case stream
1919
case fixedSize(Int)

Diff for: Sources/AsyncHTTPClient/HTTPHandler.swift

-5
Original file line numberDiff line numberDiff line change
@@ -918,11 +918,6 @@ extension TaskHandler: ChannelDuplexHandler {
918918
return
919919
}
920920

921-
// This assert can go away when (if ever!) the above `if` correctly handles other HTTP versions. For example
922-
// in HTTP/1.0, we need to treat the absence of a 'connection: keep-alive' as a close too.
923-
assert(head.version == .http1_1,
924-
"Sending a request in HTTP version \(head.version) which is unsupported by the above `if`")
925-
926921
if case .fixedSize(let length) = metadata.body {
927922
self.expectedBodyLength = length
928923
}

0 commit comments

Comments
 (0)