tag:github.com,2008:https://github.com/swift-server/async-http-client/releasesTags from async-http-client2025-02-17T17:17:16Ztag:github.com,2008:Repository/178287727/1.25.22025-02-17T17:43:59ZAsync HTTP Client 1.25.2<p>Work around Foundation revert (<a class="issue-link js-issue-link" href="https://github.com/swift-server/async-http-client/pull/813">#813</a>)</p>
<p>Motivation</p>
<p>Foundation has reverted several of the changes of behaviour in the URL
<br />type, leaving 6.0 and 6.1 with a different behaviour on non-Apple
<br />platforms than all other versions.</p>
<p>We should tolerate that.</p>
<p>Modifications</p>
<p>Update the tests to understand the difference.</p>
<p>Result</p>
<p>Tests pass</p>Lukasatag:github.com,2008:Repository/178287727/1.25.12025-02-11T13:38:38ZAsync HTTP Client 1.25.1<p>fix 5.10 compile on Ubuntu 24.04 (Noble) for Intel (x86_64) (<a class="issue-link js-issue-link" href="https://github.com/swift-server/async-http-client/pull/810">#810</a>)</p>
<p>Specifically Swift 5.10 _on Intel on Ubuntu Noble (24.04)_ has a crazy
<br />bug which leads to compilation failures in a `#if compiler(>=6.0)`
<br />block: <a class="issue-link js-issue-link" href="https://github.com/swiftlang/swift/issues/79285">swiftlang/swift#79285</a> .</p>
<p>This workaround fixes the compilation by _changing the whitespace_.</p>
<p>Thanks <a class="user-mention notranslate" href="https://github.com/gwynne">@gwynne</a> for finding this workaround!</p>
<p>---------</p>
<p>Co-authored-by: Johannes Weiss <johannes@jweiss.io></p>Lukasatag:github.com,2008:Repository/178287727/1.25.02025-02-10T10:04:32ZAsync HTTP Client 1.25.0<p>baby steps towards a Structured Concurrency API (<a class="issue-link js-issue-link" href="https://github.com/swift-server/async-http-client/pull/806">#806</a>)</p>
<p>At the moment, `HTTPClient`'s entire API surface violates Structured
<br />Concurrency. Both the creation & shutdown of a HTTP client as well as
<br />making requests (<a class="issue-link js-issue-link" href="https://github.com/swift-server/async-http-client/issues/807">#807</a>) doesn't follow Structured Concurrency. Some of
<br />the problems are:</p>
<p>1. Upon return of methods, resources are still in active use in other
<br />threads/tasks
<br />2. Cancellation doesn't always work</p>
<p>This PR is baby steps towards a Structured Concurrency API, starting
<br />with start/shutdown of the HTTP client.</p>
<p>Co-authored-by: Johannes Weiss <johannes@jweiss.io></p>Lukasatag:github.com,2008:Repository/178287727/1.24.22025-01-29T19:51:22Z1.24.2glbrntttag:github.com,2008:Repository/178287727/1.24.12025-01-29T10:05:18Z1.24.1<p>Avoid precondition failure in write timeout (<a class="issue-link js-issue-link" href="https://github.com/swift-server/async-http-client/pull/803">#803</a>)</p>
<p>### Motivation:</p>
<p>In some cases we can crash because of a precondition failure when the
<br />write timeout fires and we aren't in the running state. This can happen
<br />for example if the connection is closed whilst the write timer is
<br />active.</p>
<p>### Modifications:</p>
<p>* Remove the precondition and instead take no action if the timeout
<br />fires outside of the running state. Instead we take a new `Action`,
<br />`.noAction` when the timer fires.
<br />* Clear write timeouts upon request completion. When a request completes
<br />we have no use for the idle write timer, we clear the read timer and we
<br />should clear the write one too.</p>
<p>### Result:</p>
<p>Fewer crashes.</p>
<p>The supplied tests fails without these changes and passes with either of them.</p>rnrotag:github.com,2008:Repository/178287727/1.24.02024-11-27T12:57:06ZAsyncHTTPClient 1.24.0<p>fix 784: dont crash on huge in-memory bodies (<a class="issue-link js-issue-link" href="https://github.com/swift-server/async-http-client/pull/785">#785</a>)</p>
<p><span class="issue-keyword tooltipped tooltipped-se">fixes</span> <a class="issue-link js-issue-link" href="https://github.com/swift-server/async-http-client/issues/784">#784</a> </p>
<p>`writeChunks` had 3 bugs:
<br />1. An actually wrong `UnsafeMutableTransferBox` -> removed that type
<br />which should never be created
<br />2. A loooong future chain (instead of one final promise) -> implemented
<br />3. Potentially infinite recursion which lead to the crash in <a class="issue-link js-issue-link" href="https://github.com/swift-server/async-http-client/issues/784">#784</a>) ->
<br />fixed too</p>Lukasatag:github.com,2008:Repository/178287727/1.23.12024-10-15T09:52:53ZAsync HTTP Client 1.23.1<p>workaround Foundation.URL behavior changes (<a class="issue-link js-issue-link" href="https://github.com/swift-server/async-http-client/pull/777">#777</a>)</p>
<p>`Foundation.URL` has various behavior changes in Swift 6 to better match
<br />RFC 3986 which impact AHC.</p>
<p>In particular it now no longer strips the square brackets in IPv6 hosts
<br />which are not tolerated by `inet_pton` so these must be manually
<br />stripped.</p>
<p><a class="issue-link js-issue-link" href="https://github.com/swiftlang/swift-foundation/issues/957">swiftlang/swift-foundation#957</a>
<br /><a class="issue-link js-issue-link" href="https://github.com/swiftlang/swift-foundation/issues/958">swiftlang/swift-foundation#958</a>
<br /><a class="issue-link js-issue-link" href="https://github.com/swiftlang/swift-foundation/issues/962">swiftlang/swift-foundation#962</a></p>rnrotag:github.com,2008:Repository/178287727/1.23.02024-10-02T10:36:28ZAsync HTTP Client 1.23.0<p>Don't just import `locale_h`. (<a class="issue-link js-issue-link" href="https://github.com/swift-server/async-http-client/pull/775">#775</a>)</p>
<p>On modularised platforms, <a class="issue-link js-issue-link" href="https://github.com/swift-server/async-http-client/pull/771">#771</a> broke things because it changed from
<br />importing `Musl` or `Glibc` to importing just `locale_h`. The latter
<br />understandably doesn't define `errno` or `EOVERFLOW`, so we get a build
<br />failure.</p>
<p><span class="issue-keyword tooltipped tooltipped-se">Fixes</span> <a class="issue-link js-issue-link" href="https://github.com/swift-server/async-http-client/issues/773">#773</a>.</p>Lukasatag:github.com,2008:Repository/178287727/1.22.22024-09-18T13:18:53ZAsync HTTP Client 1.22.2<p>Explicitly import locale modules (<a class="issue-link js-issue-link" href="https://github.com/swift-server/async-http-client/pull/771">#771</a>)</p>
<p>The Darwin module is slowly being split up, and as it gets further
<br />along, it will stop importing some of the split-out modules like the one
<br />for locale.h that provides newlocale() and other locale API. However,
<br />there's a wrinkle that on platforms with xlocale, it's xlocale.h that
<br />provides most of the POSIX locale.h functions and not locale.h, so
<br />prefer the xlocale module when available.</p>Lukasatag:github.com,2008:Repository/178287727/1.22.12024-09-09T11:58:18Z1.22.1<p>Fix crash when writablity becomes false and races against finishing t…</p>
<p>…he http request (<a class="issue-link js-issue-link" href="https://github.com/swift-server/async-http-client/pull/768">#768</a>)</p>
<p>### Motivation</p>
<p>If the channel's writability changed to false just before we finished a
<br />request, we currently run into a precondition.</p>
<p>### Changes</p>
<p>- Remove the precondition and handle the case appropiatly</p>
<p>### Result</p>
<p>A crash less.</p>fabianfett