16 Commits
Author SHA1 Message Date
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 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
2025-03-28 16:02:59 +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
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 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 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
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
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
Cory Benfield d95a83fac7 Fix documentation and add infrastructure for CI-ing it (#31) 2023-04-11 13:35:28 +01:00
Cory Benfield 76a75874dd Use Docc for documentation (#25)
Motivation

Documentation is nice, and we can help support users by providing useful
clear docs.

Modifications

Add Docc to 5.6 and later builds
Make sure symbol references work
Add overview docs

Result

Nice rendering docs
2022-07-29 10:43:34 +01:00
David EvansandCory Benfield 522c301c0f Adopt Sendable (#23)
* Make RawStructuredFieldValues sendable

* Make StructuredFieldValues Sendable

* Rename _Sendable to SHSendable

* Fix date checking

* Fix warning

* Soundness

* Update date

Co-authored-by: Cory Benfield <lukasa@apple.com>

Co-authored-by: Cory Benfield <lukasa@apple.com>
2022-05-13 17:11:50 +01:00
Cory Benfield a3c50a9c10 Remove redundant conformance constraints (#22) 2022-04-22 09:46:54 +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