mirror of
https://github.com/apple/swift-http-structured-headers
synced 2026-11-25 04:47:48 +00:00
[RFC 9651] Implement adjustments for backward compatible update (#40)
Motivation: `swift-http-structured-headers` has to be updated to [RFC 9651](https://www.ietf.org/rfc/rfc9651.html). And it will be convenient for users to have this update as a SemVer minor. Modifications: - Deprecate the `BareItem` type and replace it with `RFC9651BareItem`, retaining existing behaviours. Updates for the new RFC will be based on `RFC9651BareItem`. Result: The library can be updated to the new RFC in a backward-compatible manner.
This commit is contained in:
1 parent
8cc27e208a
commit
f069b10a87
11 files changed
+218
-53
No files matched your search
@@ -15,11 +15,11 @@ import Foundation
|
||||
import RawStructuredFieldValues
|
||||
|
||||
struct ParametersDecoder<Key: CodingKey, BaseData: RandomAccessCollection> where BaseData.Element == UInt8 {
|
||||
private var parameters: OrderedMap<String, BareItem>
|
||||
private var parameters: OrderedMap<String, RFC9651BareItem>
|
||||
|
||||
private var decoder: _StructuredFieldDecoder<BaseData>
|
||||
|
||||
init(_ parameters: OrderedMap<String, BareItem>, decoder: _StructuredFieldDecoder<BaseData>) {
|
||||
init(_ parameters: OrderedMap<String, RFC9651BareItem>, decoder: _StructuredFieldDecoder<BaseData>) {
|
||||
self.parameters = parameters
|
||||
self.decoder = decoder
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user