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
@@ -11,7 +11,9 @@ needs to be listed here.
|
||||
|
||||
### Contributors
|
||||
|
||||
- Franz Busch <f.busch@apple.com>
|
||||
- Guoye Zhang <guoye_zhang@apple.com>
|
||||
- Jager-yoo <y73447jh@gmail.com>
|
||||
- Sergey Dmitriev <s.dmitriev@safe-tech.ru>
|
||||
- Tomohiro Kumagai <tomo@ez-net.jp>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -163,7 +163,7 @@ final class HTTPTypesTests: XCTestCase {
|
||||
["name": "Accept-Encoding", "value": "br"],
|
||||
["name": "Accept-Encoding", "value": "gzip"],
|
||||
["name": "Content-Length", "value": "1024"],
|
||||
]
|
||||
],
|
||||
])
|
||||
|
||||
let decoded = try JSONDecoder().decode(HTTPRequest.self, from: encoded)
|
||||
@@ -185,7 +185,7 @@ final class HTTPTypesTests: XCTestCase {
|
||||
"reasonPhrase": "No Content",
|
||||
"headerFields": [
|
||||
["name": "Server", "value": "HTTPServer/1.0", "indexingStrategy": 1],
|
||||
]
|
||||
],
|
||||
])
|
||||
|
||||
let decoded = try JSONDecoder().decode(HTTPResponse.self, from: encoded)
|
||||
|
||||
Reference in new issue
Block a user