9 Commits
Author SHA1 Message Date
f5cb839383 Fix broken SECURITY.md link in README (#80)
The Security section links a relative `SECURITY.md`, but no such file
exists in this repository, so the link 404s on the rendered README. This
points it at the repository's [security policy
page](https://github.com/apple/swift-http-structured-headers/security/policy)
instead, which resolves via the org-level default policy (verified 200).

Verified locally on macOS (Swift 6.3.3): `swift build` and `swift test`
both pass.

Prepared with AI assistance (Claude); the missing file and working
replacement URL were both mechanically verified.

Co-authored-by: Zayan Khan <khanzayan200@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-27 07:58:12 +00:00
Clinton NkwochaandCory Benfield 847a630908 Update documentation (#55)
Motivation:

swift-http-structured-headers has been updated to [RFC
9651](https://www.ietf.org/rfc/rfc9651.html).

Modifications:

- Update documentation.

Result:

An up-to-date documentation.

Co-authored-by: Cory Benfield <lukasa@apple.com>
2024-12-12 14:35:43 +00:00
George Barnett 521f0418e6 Raise minimum supported Swift version from 5.4 to 5.5 (#27)
Motivation:

We periodically drop support for older Swift versions. Now that
5.7 has been released, 5.4 can be dropped.

Modifications:

- Remove 5.4 specific Package.swift and docker-compose
- Update the 5.7 docker-compose to use the released 5.7 and move from
  focal (2004) to jammy (2204)

Results:

Minimum Swift version is 5.5
2022-09-28 17:17:48 +01:00
Cory Benfield 92e9a35d70 Add security info for structured headers. (#11) 2021-07-06 16:33:01 +01:00
Cory Benfield 27e163f96a Rename a number of types and modules. (#13)
Motivation:

In general we should try to be specific about what we're referring to.
"Structured headers" is not really an accurate description of what this
module works with: "Structured Header Field Values", or "Structured
Field Value" is usually better. To that end this change adjusts our
naming to be closer to what we want. It also changes our module names to
prioritise the use of the Codable-based one.

Modifications:

- Renamed CodableStructuredHeaders to StructuredFieldValues.
- Renamed StructuredHeaders to RawStructuredFieldValues.
- Renamed a number of types from Field to FieldValue.
- Renamed a number of types from Header to Field or FieldValue.
- Renamed some functions along the above lines.

Result:

Better and more consistent terminology will be used.
2021-07-02 11:48:41 +01:00
Cory Benfield 4b5603c912 Structured Fields is RFC 8941 now! (#10) 2021-02-09 17:55:55 +00:00
Cory Benfield 246d886cf7 Use a higher-level protocol for encoding/decoding.
Motivation:

Right now we disambiguate the multiple top-level SH types by using three
separate entry points on the encoder/decoder. This isn't great: it
forces that information to be known statically at compile time, making
it much harder to write generic APIs that use structured header fields.

Modifications:

- Provide a new protocol, `StructuredHeaderField`, that must be used for
  the top-level `Codable` object.
- Provide `StructuredHeaderFieldType` to communicate the types of
  structured header fields.
- Remove the multiple entry points.
- Update the tests.

Result:

Types will encode what kind of structured header field they are.
2020-07-27 08:07:46 +01:00
Cory Benfield e12def54da Add docs and license 2020-07-16 16:34:38 +01:00
Cory Benfield fa8c1e771c Initial commit 2020-06-19 17:17:12 +01:00