mirror of
https://github.com/apple/swift-http-types
synced 2026-11-25 04:47:48 +00:00
Update contributors
This commit is contained in:
1 parent
31ddb8d558
commit
43107b6de1
5 files changed
+13
-6
No files matched your search
@@ -144,7 +144,7 @@ public struct HTTPField: Sendable, Hashable {
|
||||
}
|
||||
|
||||
static func legalizeValue(_ value: ISOLatin1String) -> ISOLatin1String {
|
||||
if Self._isValidValue(value._storage.utf8) {
|
||||
if self._isValidValue(value._storage.utf8) {
|
||||
return value
|
||||
} else {
|
||||
let bytes = value._storage.utf8.lazy.map { byte -> UInt8 in
|
||||
|
||||
@@ -289,8 +289,13 @@ extension HTTPRequest.PseudoHeaderFields: Codable {
|
||||
guard HTTPField.isValidToken(method.rawValue._storage) else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "\"\(method.rawValue._storage)\" is not a valid method")
|
||||
}
|
||||
self.init(method: method, scheme: scheme, authority: authority, path: path,
|
||||
extendedConnectProtocol: extendedConnectProtocol)
|
||||
self.init(
|
||||
method: method,
|
||||
scheme: scheme,
|
||||
authority: authority,
|
||||
path: path,
|
||||
extendedConnectProtocol: extendedConnectProtocol
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ public struct HTTPResponse: Sendable, Hashable {
|
||||
}
|
||||
|
||||
static func legalizingReasonPhrase(_ reasonPhrase: String) -> String {
|
||||
if Self.isValidReasonPhrase(reasonPhrase) {
|
||||
if self.isValidReasonPhrase(reasonPhrase) {
|
||||
return reasonPhrase
|
||||
} else {
|
||||
let scalars = reasonPhrase.unicodeScalars.lazy.map { scala -> UnicodeScalar in
|
||||
|
||||
Reference in new issue
Block a user