22 Commits

Author SHA1 Message Date
George Barnett 20216dfe9d Drop support for Swift 5.9 (#845) 2025-05-22 11:56:34 +01:00
George Barnett 6023598316 Fix 5.9 build (#844)
Motivation:

An oversight in 373862a meant that 5.9 wasn't actually dropped which
means that the use of 'nonisolated(unsafe)' in 0e715a27 broke users of
5.9.

Modifications:

- Add back a 5.9 path

Result:

- Builds on 5.9
- Resolves #843
2025-05-22 11:07:10 +01:00
George Barnett 0e715a2793 Fix a few simple sendability issues (#832)
Motivation:

We're about to go on a sendability journey. Let's pick some low hanging
fruit to get started.

Modifications:

- Add a few assume-isolated calls
- Stop using static var
- Use a dispatch group instead of a work item to wait for work to be
done.

Result:

Fewer warnings
2025-04-28 14:17:36 +01:00
Marc Prud'hommeaux e69318d4cb Android support (#799)
This PR adds support for Android, mostly just by importing the Android
module when needed.
2025-01-14 16:39:43 +00:00
Rick Newton-Rogers c621142327 Adopt GitHub actions (#780)
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.
* Disabled warnings-as-errors on Swift 6.0 CI pipelines for now.

### Result:

Feature parity with old CI.
2024-10-29 15:01:46 +00:00
Alastair Houghton 64abc77edf Don't just import locale_h. (#775)
On modularised platforms, #771 broke things because it changed from
importing `Musl` or `Glibc` to importing just `locale_h`. The latter
understandably doesn't define `errno` or `EOVERFLOW`, so we get a build
failure.

Fixes #773.
2024-09-30 10:17:01 -07:00
Ian Anderson 6df8e1c17e Explicitly import locale modules (#771)
The Darwin module is slowly being split up, and as it gets further
along, it will stop importing some of the split-out modules like the one
for locale.h that provides newlocale() and other locale API. However,
there's a wrinkle that on platforms with xlocale, it's xlocale.h that
provides most of the POSIX locale.h functions and not locale.h, so
prefer the xlocale module when available.
2024-09-14 07:55:55 +01:00
Alastair Houghton 09b7eb751e Add support for Musl. (#726)
Motivation:

We would like to make this work for Musl so that we can build fully
statically linked binaries that use AsyncHTTPClient.

Modifications:

Define `_GNU_SOURCE` as a compiler argument; doing it in a source file
doesn't work properly with modular headers.

Add imports of `Musl` in appropriate places.

`Musl` doesn't have `strptime_l`, so avoid using that.

Result:

async-http-client will build for Musl.
2024-01-19 16:09:35 -08:00
David Nadoba 0b5bec741b Replace NIOSendable with Sendable (#640) 2022-10-12 08:50:28 +01:00
David Nadoba c3c90aab58 Adopt Sendable (#621) 2022-08-25 11:45:13 +02:00
Karl 972bcddedc Redo HTTP cookie parsing (#510)
* Redo HTTP cookie parsing using strptime

* Make String(utf8Slice:from:) less ugly

* Adjust cookie component parsing to better match RFC-6562
2022-01-06 16:40:55 +00:00
Fabian Fett e5022468bb Update swiftformat to 0.48.8 (#491)
### Motivation

Our current swiftformat version does not support async/await. Since we want to add support for async/await we must update swiftformat or disable it. I tried my very best to keep the number of changes as small as possible. I assume we want to stick with the new 0.48.8 for some time.

### Changes

- Update swiftformat to 0.48.8

### Result

We can land async/await code.
2021-11-25 10:15:36 +01:00
Sergei Fundaev 1361eccfb2 Double quoted cookie values are supported now. (#460)
Motivation:

In according to RFC 6265 a cookie value may be placed between double quotes.

Modifications:

HTTPClient.Cookie ignores now the double quotes at the beginning and the ending of a cookie value.
New unit test is added to check it.

Result:

Quoted cookie values are parsed properly now.
2021-10-20 11:08:29 +01:00
Artem Redkin 1bc2e1ae23 add another expires date format (#315) 2020-11-11 15:43:44 +00:00
Artem Redkin 0fbfdcc9f0 fix malformed cookie parsing (#210) 2020-05-13 18:31:36 +01:00
Artem Redkin 75a04337d9 allow empty value cookies (#208) 2020-05-13 09:41:26 +01:00
Artem Redkin f8b8de198c make cookie parsing case insensitive (#207) 2020-05-13 09:34:50 +01:00
Artem Redkin 2fcf0a9fdd fix location header lookup (#186) 2020-03-31 09:56:44 +01:00
tomer doron 018e139eef update copyrights note (#125)
motivation: the Swift Server Workgroup is not a legal entity and cannot hold copyrights. with this change, code authors continue and retain their copyrights under the apache license and previous copyrights note, but Apple steps up instead of the workgroup which has no legal status

changes:
* update header files to say "Apple Inc. and the AsyncHTTPClient project authors" instead of "Swift Server Workgroup and the AsyncHTTPClient project authors"
* update validation scripts to check for the correct header
* add CONTRIBUTING.md file to explain how to make contributions and include a legal notice about licensing the contribution to Apple and the project
* regenerate CONTRIBUTORS.md to reflect most recent contributions
2019-11-06 11:20:30 -08:00
vkill 5156eb22b1 Fix forgot to set maxAge in Cookie init function (#91) 2019-08-24 11:21:05 +01:00
Artem Redkin 0c617a4d7f document public API (#62)
Co-Authored-By: Joe Smith <yasumoto7@gmail.com>
2019-07-17 10:56:54 +01:00
Artem Redkin 27fe9265b2 rename to async-http-client (#58) 2019-07-02 14:00:34 +03:00