tag:github.com,2008:https://github.com/swift-server/async-http-client/releases Tags from async-http-client 2025-02-17T17:17:16Z tag:github.com,2008:Repository/178287727/1.25.2 2025-02-17T17:43:59Z Async 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> Lukasa tag:github.com,2008:Repository/178287727/1.25.1 2025-02-11T13:38:38Z Async 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(&gt;=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 &lt;johannes@jweiss.io&gt;</p> Lukasa tag:github.com,2008:Repository/178287727/1.25.0 2025-02-10T10:04:32Z Async 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 &amp; 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 &lt;johannes@jweiss.io&gt;</p> Lukasa tag:github.com,2008:Repository/178287727/1.24.2 2025-01-29T19:51:22Z 1.24.2 glbrntt tag:github.com,2008:Repository/178287727/1.24.1 2025-01-29T10:05:18Z 1.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> rnro tag:github.com,2008:Repository/178287727/1.24.0 2024-11-27T12:57:06Z AsyncHTTPClient 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` -&gt; removed that type <br />which should never be created <br />2. A loooong future chain (instead of one final promise) -&gt; 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>) -&gt; <br />fixed too</p> Lukasa tag:github.com,2008:Repository/178287727/1.23.1 2024-10-15T09:52:53Z Async 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> rnro tag:github.com,2008:Repository/178287727/1.23.0 2024-10-02T10:36:28Z Async 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> Lukasa tag:github.com,2008:Repository/178287727/1.22.2 2024-09-18T13:18:53Z Async 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> Lukasa tag:github.com,2008:Repository/178287727/1.22.1 2024-09-09T11:58:18Z 1.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