diff --git a/Sources/Hummingbird/Utils/HTTPFields+Payload.swift b/Sources/Hummingbird/Utils/HTTPFields+Payload.swift index ab4d89d8f..6299ea6b0 100644 --- a/Sources/Hummingbird/Utils/HTTPFields+Payload.swift +++ b/Sources/Hummingbird/Utils/HTTPFields+Payload.swift @@ -2,13 +2,9 @@ import HTTPTypes extension HTTPFields { init(contentType: String, contentLength: Int) { - self.init() - - // Content-Type, Content-Length, Server, Date + 2 extra headers - // This should cover our expected amount of headers - self.reserveCapacity(6) - - self[.contentType] = contentType - self[.contentLength] = String(describing: contentLength) + self = [ + .contentType: contentType, + .contentLength: String(describing: contentLength) + ] } }