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.
HTTPResumableUpload contains the core logic. It uses an event loop to
synchronize its state internally. Some methods are safe to call from off
of that event loop and have been moved to a new sendable view. The
HTTPResumableUpload type is marked as explicitly not sendable.
As such, most other types now hold on to the sendable view and use that
as the interface to HTTPResumableUpload.
HTTPResumableUploadChannel must be sendable (it's a Channel) and now
uses safe abstractions (where possible).
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.
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.
### Motivation:
Stricter import rules mean that using the `sin_addr` property on Linux
requires the explicit CNIOLinux import.
### Modifications:
Added the missing import.
### Result:
Fixes a CI diagnostic.
We use 8*10^9 in `NIOHTTPResponsiveness` however this number will
overrun the integer size on platforms with 32-bit pointer-width such as
watchOS.
This change drops down to use 1*10^9 on such platforms.
Implementation of
https://datatracker.ietf.org/doc/draft-ietf-ippm-responsiveness/ (draft
5) with flexible download and upload handlers to suit other use cases as
well.
### Motivation:
The provided handlers are useful for measuring responsiveness and
testing things like performance of proxies
### Modifications:
Add `NIOHTTPResponsiveness` and `NIOHTTPResponsivenessServer`
### Result:
We'll now have an implementation of the Responsiveness under Working
Conditions draft
---------
Co-authored-by: George Barnett <gbarnett@apple.com>
Add Android support
### Motivation:
Support the Android platform.
### Modifications:
Add Android imports and fix the default temporary directory to be
correct for the OS.
### Result:
The package will build and test on Android.
---------
Co-authored-by: George Barnett <gbarnett@apple.com>
Motivation:
The latest NIO release deprecated a number of APIs and added more
Sendable contraints.
Modifications:
- Use sync APIs where possible
- Use `_deprecated` but not `@deprecated` NIOFileHandle API
- Stop using NIOAny
Result:
No warnings
Allow applications to trigger HTTP/2 stream resets while using
NIOHTTPTypesHTTP2's codecs
### Motivation:
Resetting streams with specific error codes is required by some
applications such as those implementing the CONNECT method
(see https://datatracker.ietf.org/doc/html/rfc9113#section-8.5-8).
Unfortunately, the HTTP2ToHTTP codecs don't expose this capability to
applications.
### Modifications:
Introduce an outbound user event applications can trigger when needing
to reset an HTTP/2 stream.
### Result:
Now applications can trigger HTTP/2 stream resets while using the codecs
provided by NIOHTTPTypesHTTP2
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.
Support HTTP resumable upload.
### Motivation:
Supporting HTTP resumable upload protocol defined in
https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-resumable-upload-05
* Interop version 3: iOS 17.0, macOS 14.0
* Interop version 5: iOS 18.0, macOS 15.0
* Interop version 6: iOS 18.1, macOS 15.1
### Modifications:
2 new public classes, `HTTPResumableUploadHandler` and
`HTTPResumableUploadContext`, and a few other supporting objects to
manage resumable uploads and translate them into regular uploads.
---------
Co-authored-by: Jonathan Flat <jflat@apple.com>
Co-authored-by: Cory Benfield <lukasa@apple.com>
### Motivation:
* `main.yml` and `scheduled.yml` are mostly duplicative.
* Scheduled runs failed because of a deprecated reference to a Swift 5.8
pipeline
### Modifications:
* Unify `main.yml` and `scheduled.yml`
* Remove the reference to the 5.8 pipeline
### Result:
Working scheduled runs.
### 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.
### Motivation:
`LineBasedFrameDecoder.decodeLast` throws an error if there is more than
one frame’s worth of bytes remaining in the buffer.
This is in violation of the `NIOSingleStepByteToMessageDecoder`protocol
requirement that this method be called in a loop until all bytes are
decoded.
### Modifications:
* The method now only throws if the decode operation could not return a
frame and there are bytes left in the buffer (previously only the latter
criterion applied).
* Method documentation is updated.
* Test added.
### Result:
`LineBasedFrameDecoder.decodeLast` can cope with more edge cases.
Co-authored-by: Rick Newton-Rogers <rnro@apple.com>
* Added support for conditional response compression
* Updated expectations to be fulfilled via a defer
* Updated compression response predicate to return an intent enum rather than a boolean
Motivation:
`NIOHTTPDecompression` erroneously accumulates decompressed data sizes across multiple requests in a single channel, leading to unwarranted `DecompressionError.limit` errors. This affects applications using persistent connections, as the decompression limits are improperly enforced. This change aims to address and rectify this issue.
Modifications:
- Add initialization of `inflated` within `Decompressor.initializeDecoder`.
- Introduced new tests to validate decompression functionality across multiple requests on the same channel
Result:
This fix ensures each request's decompression size is independently considered, eliminating incorrect limit errors, and enhancing reliability for applications using HTTP compression with persistent connections.
Motivation
Nightly CI builds require annotations on retroactive conformances.
We have a few used only in tests, which are totally safe.
Modifications
Add retroactive conformance marker.
Result
Nightly CI works again