95 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
Rick Newton-Rogers a5c7009c70 Migrate macOS build argument overrides to Swift version inputs (#79)
Motivation

* The shared `macos_tests.yml` workflow no longer accepts
  `xcode_16_2_build_arguments_override` and the `xcode_16_3` input is a
  no-op. Passing the removed input causes CI to fail.
* Older Xcodes are being removed from the runners; Swift version inputs
  are the replacement.

Modifications

* Replace `xcode_16_2/16_3_build_arguments_override` with
  `swift_6_1/6_2/6_3_build_arguments_override` carrying the same
  `-Xswiftc -Xfrontend -Xswiftc -require-explicit-sendable` value.

Result

* macOS CI passes again using the Swift version inputs.
2026-05-15 11:30:54 +02:00
Rick Newton-Rogers 933538faa4 Drop Swift 6.0 (#78)
Motivation:

Swift 6.0 is no longer supported, we should bump the tools version and
remove it from our CI.

Modifications:

* Bump the Swift tools version to Swift 6.1
* Remove Swift 6.0 jobs where appropriate in main.yml, pull_request.yml

Result:

Code reflects our support window.
1.7.0
2026-04-01 21:19:32 +01:00
Rick Newton-Rogers 45cfa7490a Enable Swift 6.3 jobs in CI (#77)
Motivation:

Swift 6.3 has been released, we should add it to our CI coverage.

Modifications:

Add additional Swift 6.3 jobs where appropriate in main.yml,
pull_request.yml

Result:

Improved test coverage.
2026-04-01 13:55:15 +01:00
Mike Drob 8ab913a0eb Use org security policy instead of our bespoke version (#76) 2026-03-11 18:26:48 +00:00
Rick Newton-Rogers 7394d5af46 update actions/checkout from v4 to v6 (#75)
Motivation

* Following [GitHub's
announcement](https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/),
Node 20 is being deprecated and runners will begin using Node 24 by
default starting March 4th, 2026. Node 20 will reach end-of-life in
April 2026.

Modifications

* Upgrade GitHub Actions to their latest versions to ensure
compatibility with Node 24.
* Replace `actions/checkout@v4` with `actions/checkout@v6` in all
workflow files.

Result

* Workflow files reference `actions/checkout@v6`.
2026-03-02 13:29:31 +00:00
Rick Newton-Rogers 26021c89b0 switch from main to 0.0.7 for swiftlang workflows (#74)
Motivation

* `@main` references to `swiftlang/github-workflows` are deprecated.

Modifications

* Replace `@main` with `@0.0.7` in all workflow files.

Result

* Workflow files reference a pinned version of
`swiftlang/github-workflows`.
2026-02-20 13:29:18 +00:00
Joannis Orlandos 76d7627bd8 Add support for Windows (#73) 1.6.0 2025-11-04 14:52:31 -05:00
Melissa Kilby 1a387808d4 chore: restrict GitHub workflow permissions - future-proof (#72)
See https://github.com/swiftlang/github-workflows/issues/167 for
additional context

This approach aligns with security best practices, as detailed in the
following documentation:

-
https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions
-
https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#defining-access-for-the-github_token-scopes
-
https://openssf.org/blog/2024/08/12/mitigating-attack-vectors-in-github-workflows/


The default GITHUB_TOKEN permissions are defined at the repository
level. This PR modifies the workflow-level overrides to conform to
OpenSSF best practices -> defense in depth.

Allow me to quote OpenSSF:

https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

> The highest score is awarded when the permissions definitions in each
workflow's yaml file are set as read-only at the top level and the
required write permissions are declared at the run-level.”

> Remediation steps
> - Set top-level permissions as read-all or contents: read as described
in GitHub's documentation.
> - Set any required write permissions at the job-level. Only set the
permissions required for that job; do not set permissions: write-all at
the job level.


Compare to the LLVM project:

Top-level: contents read, e.g.
https://github.com/swiftlang/llvm-project/blob/next/.github/workflows/build-ci-container-windows.yml#L3-L4
-> this makes it future-proof

Job-level: Allow write permissions as needed, e.g.
https://github.com/swiftlang/llvm-project/blob/next/.github/workflows/build-ci-container-windows.yml#L53-L58

Signed-off-by: Melissa Kilby <mkilby@apple.com>
2025-10-20 08:48:43 +01:00
Orhan Yigit Yazicilar a9f3c352f4 Drop Swift 5.10 (#71)
### Motivation:

Swift 5.10 is no longer supported, we should bump the swift-tools
version.

### Modifications:

* Update Swift tools version to 6.0

### Result:

Code reflects our support window.
1.5.0
2025-09-25 13:46:50 +01:00
Rick Newton-Rogers b8731d8e0b Enable Swift 6.2 jobs in CI (#70)
Motivation:

Swift 6.2 has been released, we should add it to our CI coverage.

Modifications:

Add additional Swift 6.2 jobs where appropriate in main.yml,
pull_request.yml

Result:

Improved test coverage.
2025-09-22 13:22:34 +01:00
Raphael 1625f271af Enable release mode builds (#69)
### Motivation:

Some errors do not show up in debug builds. Enabling release mode builds
improves the CI coverage.

### Modifications:

Enable release mode builds for pull requests and scheduled builds on
main.

### Result:

Improved CI coverage.
1.4.0
2025-07-30 08:55:24 +01:00
Rafael Cepeda 64af0a5003 Fixed sendability warnings when -require-explict-sendable flag is enabled (#68)
Fixed sendability warnings when -require-explict-sendable flag is
enabled. Added -Xswiftc -Xfrontend to fix GA workflow.
2025-06-20 12:57:43 +01:00
Rick Newton-Rogers db6eea3692 Update StructuredFieldValueParser to add missing visionOS guard (#67)
Update StructuredFieldValueParser to add missing visionOS guard matching
the guards on the called API. This was causing failures to compile for
visionOS
1.3.0
2025-05-13 13:30:24 +01:00
Rick Newton-Rogers 295bc9d823 Drop Swift 5.9 (#66)
Motivation:

Swift 5.9 is no longer supported, we should bump the tools version and
remove it from our CI.

Modifications:

* Bump the Swift tools version to Swift 5.10
* Remove Swift 5.9 jobs where appropriate in main.yml, pull_request.yml

Result:

Code reflects our support window.
2025-05-07 06:42:37 +01:00
Rick Newton-Rogers f280fc7676 Enable Swift 6.1 jobs in CI (#65)
Motivation:

Swift 6.1 has been released, we should add it to our CI coverage.

Modifications:

Add additional Swift 6.1 jobs where appropriate in main.yml,
pull_request.yml

Result:

Improved test coverage.
1.2.2
2025-04-14 10:50:37 +01:00
Rick Newton-RogersandCory Benfield 3d33634532 Add static SDK CI workflow (#61)
Add static SDK CI workflow which runs on commits to PRs, merges to main
and daily on main.

---------

Co-authored-by: Cory Benfield <lukasa@apple.com>
2025-04-02 13:35:42 +00:00
Rick Newton-Rogers 68dea5d389 Enable macOS CI on pull requests (#64)
Motivation:

* Improve test coverage

Modifications:

Enable macOS CI to be run on pull request commits and make the use of
the nightly runner pool for main.yml jobs explicit.

Result:

Improved test coverage.
2025-04-01 17:42:05 +01:00
Rick Newton-Rogers 8e769facea Update FieldParser.swift availability guard (#63)
Update FieldParser.swift availability guard for 
```
String(unsafeUninitializedCapacity: unescapedBytes.count)
```
which is only available on Mac Catalyst 14.0 or later
1.2.1
2025-03-28 16:02:59 +00:00
Rick Newton-Rogers ddbbf18ea2 Enable macOS CI on merge to main and daily timer (#62)
Motivation:

* Improve test coverage
* Check test pass/fail status
* Monitor CI throughput

Modifications:

Enable macOS CI to be run on all merges to main and on a daily timer.

Result:

Improved test coverage run out-of-band at the moment so we can get a
feeling for if any changes need to be made in the repo or in the CI
pipelines to ensure timely and stable checks.
2025-03-28 14:53:23 +00:00
Rick Newton-Rogers 71572c3592 Only apply standard swift settings on valid targets (#60)
Only apply standard swift settings on valid targets. The current check
ignores plugins but that is not comprehensive enough.
2025-03-07 15:05:33 +00:00
Rick Newton-Rogers 9904e916c6 Rename nightly_6_1 params to nightly_next (#59)
Rename nightly_6_1 params to nightly_next; see
https://github.com/apple/swift-nio/pull/3122
2025-03-03 14:48:23 +00:00
Rick Newton-Rogers 5e56fd2512 CI use 6.1 nightlies (#58)
CI use 6.1 nightlies now that Swift development is happening in the 6.1
branch
2025-01-30 09:45:34 +00:00
Marc Prud'hommeaux ceae3ec5a4 Android support (#57)
This PR adds the single import needed to build and test on Android.
2025-01-14 14:49:23 +00:00
Franz Busch d01361d32e Update release.yml (#56)
Update the release.yml file with the latest label changes
1.2.0
2024-12-18 13:10:08 +00:00
Rick Newton-RogersandGeorge Barnett 0e5c5f5be2 Enable MemberImportVisibility check on all targets (#54)
Enable MemberImportVisibility check on all targets. Use a standard
string header and footer to bracket the new block for ease of updating
in the future with scripts.

Co-authored-by: George Barnett <gbarnett@apple.com>
2024-12-16 11:01:04 +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
Clinton Nkwocha 1a14678249 Integer serialization fix for 32 bit platform compatibility (#52)
Motivation:

[RFC 9651](https://www.ietf.org/rfc/rfc9651.html) permits serializing an
integer in the range of -999,999,999,999,999 to 999,999,999,999,999
inclusive ([Section
4.1.4-2.1.1](https://www.ietf.org/rfc/rfc9651.html#section-4.1.4-2.1.1)).
As `RFC9651BareItem` takes values `integer` or `date` with an associated
value of type `Int`, that range is implicitly more constrained on 32-bit
platforms to a subset range of `Int32.min` to `Int32.max` inclusive.

Modifications:

- Adjust `RFC9651BareItem` to take values `integer` or `date` with an
associated value of type `Int64` instead, which is sufficient for the
permitted range.

Result:

Compatibility for the Integer and Date Structured Types on 32-bit
platforms.
2024-12-12 14:16:50 +00:00
Clinton NkwochaandCory Benfield be84570e9f Add support for Display String type to StructuredFieldValues (#51)
Motivation:

The parser and serializer for the Display String type have been
implemented. The high-level encoder and decoder should follow.

Modifications:

Implement the encoder and decoder for Display String.

Result:

The StructuredFieldValues module will support the Display String type.

---------

Co-authored-by: Cory Benfield <lukasa@apple.com>
2024-12-10 07:56:51 +00:00
Clinton Nkwocha 0d92bf6b08 Enable strict concurrency (#53)
Motivation:

To catch potential data races at build time.

Modifications:

- Enable strict concurrency in Package.swift.
- Add `Sendable` conformance to `StructuredFieldType`.
- Swap
[concurrency-unsafe](https://github.com/swiftlang/swift/issues/66213)
`CommandLine.arguments` for `ProcessInfo.processInfo.arguments`.

Result:

Strict concurrency adoption.
2024-12-05 12:16:11 +01:00
Franz Busch 8126775202 Aligning semantic version label check name (#50) 2024-11-28 11:58:22 +00:00
Clinton Nkwocha 6e527aa16a Add support for Date type to StructuredFieldValues (#49)
Motivation:

The parser and serializer for the Date type has been implemented. The high-level encoder and decoder should follow.

Modifications:

- Implement the encoder and decoder for Date.

Result:

The StructuredFieldValues module will support the Date type.
2024-11-26 16:04:41 +00:00
Clinton Nkwocha c2e79ce44c [RFC 9651] Add support for Display String type to RawStructuredFieldValues (#43)
Motivation:

RFC 9651 added the Display String Structured Type.

Modifications:

Implement the parser and serializer for Display String in the RawStructuredFieldValues module.

Result:

The RawStructuredFieldValues module will support the Display String type.
2024-11-22 18:11:50 +00:00
Rick Newton-Rogers 960eccb609 add .editorconfig file (#45) 2024-11-15 10:59:35 +00:00
Rick Newton-Rogers 60b0bc53ac remove unused Swift 6 Soundness workflow (#47) 2024-11-15 09:49:56 +00:00
Rick Newton-Rogers b4a8ec4f98 remove contributors script (#46) 2024-11-14 16:18:59 +00:00
Rick Newton-Rogers 8b35bf45bf Migrate to GitHub Actions (#42)
Migrate CI to use GitHub Actions.

Motivation:

To migrate to GitHub actions and centralised infrastructure.

Modifications:

Changes of note:
* Adopt swift-format using rules from SwiftNIO
* Remove scripts and docker files which are no longer needed

Result:

Feature parity with old CI.
2024-10-30 13:20:20 +00:00
Clinton Nkwocha b0bf94fb2d [RFC 9651] Add support for Date type to RawStructuredFieldValues (#41)
Motivation:

[RFC 9651](https://www.ietf.org/rfc/rfc9651.html) added the Date Structured Type.

Modifications:

- Implement the parser and serializer for Date in the RawStructuredFieldValues module.

Result:

The RawStructuredFieldValues module will support the Date type.
2024-10-28 14:01:46 +00:00
Clinton Nkwocha f069b10a87 [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.
2024-10-23 10:56:35 +01:00
LamTrinh.Dev 8cc27e208a Correct the link of sswg-security at SECURITY.md (#39) 1.1.0 2024-09-09 01:26:55 -07:00
Franz Busch 5debbb95c3 Add release.yml (#38) 2024-09-06 05:59:57 -07:00
George Barnett 6409185acd Raise minimum Swift version to 5.8 (#37) 2024-03-11 08:43:03 +00:00
Yim Lee 2e8ae2a766 Add CI for Swift 5.10 (#36) 2024-01-23 08:59:22 +00:00
Cory Benfield 9055e7c729 Remove unneeded compiler guard. (#35)
Motivation:

We no longer support compilers older than 5.3 (or indeed older than
5.6), so we don't need compiler guards for old ones.

Modifications:

Remove fallback for old compilers.

Result:

Easier to understand code
1.0.0
2023-08-01 15:15:17 +01:00
Peter AdamsandCory Benfield ef88c2245f Remove Swift 5.5 Dockerfile (#34)
* Remove Swift 5.5 Dockerfile

Motivation:

Swift 5.5 is no longer supported.

Modifications:

Remove Swift 5.5 Dockerfile

Result:

Swift 5.5 support fully removed

* Remove SHSendable

---------

Co-authored-by: Cory Benfield <lukasa@apple.com>
2023-04-14 03:21:10 -07:00
Peter Adams e8c756ea88 Remove support for swift 5.5 (#33)
Motivation:

Policy is to support 3 swift versions and 5.8 has now been released.

Modifications:

Remove Package.swift for 5.5

Result:

Swift 5.5 no longer supported
2023-04-14 03:06:10 -07:00
Yim Lee b61fdcfd3f Add docker-compose file for Swift 5.9 (#32) 2023-04-13 09:46:53 +01:00
Cory Benfield d95a83fac7 Fix documentation and add infrastructure for CI-ing it (#31) 2023-04-11 13:35:28 +01:00
David Nadoba 2e4ee75062 Add Swift 5.8 CI and update nightly CI to Ubuntu 22.04 (#30) 2023-01-18 08:16:57 +01:00
Yim Lee fd202d4852 Add .spi.yml for Swift Package Index DocC support (#29) 2022-12-02 09:53:52 +00:00