Skip to content

Commit 901f2ae

Browse files
fabianfettLukasa
andauthored
Update Sources/AsyncHTTPClient/RequestValidation.swift
Co-authored-by: Cory Benfield <[email protected]>
1 parent 0d47360 commit 901f2ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: Sources/AsyncHTTPClient/RequestValidation.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ extension HTTPHeaders {
1919
mutating func validate(method: HTTPMethod, body: HTTPClient.Body?) throws -> RequestFramingMetadata {
2020
var metadata = RequestFramingMetadata(connectionClose: false, body: .none)
2121

22-
if self[canonicalForm: "connection"].map({ $0.lowercased() }).contains("close") {
22+
if self[canonicalForm: "connection"].lazy.map({ $0.lowercased() }).contains("close") {
2323
metadata.connectionClose = true
2424
}
2525

0 commit comments

Comments
 (0)