Skip to content

Releases: swhitty/FlyingFox

0.5.0

13 Mar 23:33
65c808e
Compare
Choose a tag to compare
  • Responds to socket hangups via POLLHUP, POLLERR and POLLNVAL
  • HTTPServer reliably throws error when listening socket is suspended in background (iOS).
  • Corrects IPv6 address that appears in logs.

0.4.1

07 Mar 04:26
45f5584
Compare
Choose a tag to compare

Fixes bug where sockets where not polling for write events POLLOUT at all 😱

0.4.0

06 Mar 04:52
e5d510c
Compare
Choose a tag to compare

Several enhancements have been made to HTTPRoute that enable fine grained pattern matching of requests.

Query items can now be matched:

await server.appendRoute("GET /meal?side=fish", to: .file(named: "meal-fish.json"))
await server.appendRoute("GET /meal?side=chips", to: .file(named: "meal-chips.json"))

HTTP headers can also be matched:

let json = HTTPRoute("*", headers: [.contentType: "application/json"])
let xml  = HTTPRoute("*", headers: [.contentType: "application/xml"])

await server.appendRoute(json, to: .file(named: "sample.json"))
await server.appendRoute(xml, to: .file(named: "sample.xml"))

And request body can also be matched:

public protocol HTTPBodyPattern: Sendable {
  func evaluate(_ body: Data) -> Bool
}

Darwin platforms can pattern match a JSON body with an NSPredicate:

let route = HTTPRoute("POST *", body: .json(where: "food == 'fish'"))
{"side": "chips", "food": "fish"}

0.3.1

28 Feb 06:02
6645565
Compare
Choose a tag to compare

Renamed CompositeHTTPHandler to RoutedHTTPHandler

0.3.0

24 Feb 22:29
ceda81b
Compare
Choose a tag to compare

Adds CompositeHTTPHandler and HTTPUnhandledError to support more flexible handling of requests.

0.2.0

20 Feb 05:33
e8d072f
Compare
Choose a tag to compare
  • Adds support for both tvOS and Linux.
  • Improves read performance with ChunkedAsyncSequence
  • Bug Fixes

0.1.0

15 Feb 12:40
78fad96
Compare
Choose a tag to compare

Hello World!