Skip to content

Commit f9f1050

Browse files
committed
Code review
1 parent 901f2ae commit f9f1050

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
@@ -313,11 +313,6 @@ extension HTTPClient {
313313

314314
let metadata = try head.headers.validate(method: self.method, body: self.body)
315315

316-
// This assert can go away when (if ever!) the above `if` correctly handles other HTTP versions. For example
317-
// in HTTP/1.0, we need to treat the absence of a 'connection: keep-alive' as a close too.
318-
assert(head.version == HTTPVersion(major: 1, minor: 1),
319-
"Sending a request in HTTP version \(head.version) which is unsupported by the above `if`")
320-
321316
return (head, metadata)
322317
}
323318
}

0 commit comments

Comments
 (0)