Skip to content

Releases: swhitty/FlyingFox

Fix WebSocket frames

20 Oct 23:19
0482ba5
Compare
Choose a tag to compare

Small bug fix release

Linux Static SDK Support / Fix Linking Issue

13 Oct 22:22
17bf618
Compare
Choose a tag to compare

Fixes linking issue when archiving builds on Darwin platforms when using Xcode 16 (#122) 🙏🏻 @nneubauer

Adds initial support for static linux SDK (Musl) #121

Swift 6 Language Mode

10 Sep 04:50
e7f38fe
Compare
Choose a tag to compare

Uses Swift 6 language mode when building with Xcode 16 (RC)

Makes EchoWSMessageHandler public #115 🙏🏻 @stefanomondino

Unit tests have been migrated to Swift Testing when available

Uses variation of lock from swift-mutex

Uses variation of withThrowingTimeout from swift-timeout

New HTTPBodySequence

16 Aug 07:34
f7829d4
Compare
Choose a tag to compare

Swift 5.9+

Support for Swift 5.8 has been removed.

HTTPBodySequence

HTTPBodySequence has had the underlying sequence replaced to consume less memory.

  • Requests with body size < 2MB are now buffered on demand via HTTPSharedReplaySequence. These sequences can be iterated multiple times concurrently.
  • Requests with body size > 2MB are not buffered and can only be iterated a single time.

Configuration

HTTPServer.Configuration is a new struct containing all properties used to start HTTPServer.

Remote Address

HTTPRequest.remoteAddress allows handlers to receive the address and port of the remove client making the request.

HTTPRequest.remoteIPAddress is also added as a convenience, preferring the client value from the X-Forwarded-For header which is useful for handlers running behind a reverse proxy.
🙏🏻 @blaineam

watchOS Support

Support for watchOS was added #105, #98
🙏🏻 @NicoHinderling @noahsmartin

Windows fix

A bug was fixed within windows builds #104
🙏🏻 @bdashore3

Dynamic Buffer Overflow Fix

A fix for a buffer overflow #109
🙏🏻 @chosa91

Route Parameters

13 Jul 23:46
b37b5ab
Compare
Choose a tag to compare
  • Adds route parameters (🙏🏻 @tonyarnold)
  • HTTPRoute now matches methods against Set<HTTPMethod>
  • Replaces AsyncChunkedSequence with AsyncBufferedSequence
  • Support for Transfer-Encoding: chunked for responses without a known size

Route Parameters

Routes can include named parameters within a path or query item using the : prefix. Any string supplied to this parameter will match the route, handlers can access the value of the string using request.routePamaters.

handler.appendRoute("GET /creature/:name?type=:beast") { request in
  let name = request.routeParameters["name"]
  let beast = request.routeParameters["beast"]
  return HTTPResponse(statusCode: .ok)
}

When using Swift 5.9+, route parameters can be automatically extracted and mapped to closure parameters of handlers.

enum Beast: String, HTTPRouteParameterValue {
  case fish
  case dog
}

handler.appendRoute("GET /creature/:name?type=:beast") { (name: String, beast: Beast) -> HTTPResponse in
  return HTTPResponse(statusCode: .ok)
}

The request can be optionally included.

handler.appendRoute("GET /creature/:name?type=:beast") { (request: HTTPRequest, name: String, beast: Beast) -> HTTPResponse in
  return HTTPResponse(statusCode: .ok)
}

String, Int, Double, Bool and any type that conforms to HTTPRouteParameterValue can be extracted.

0.14.0 RangeReplaceableCollection

14 Apr 08:46
c9e0d35
Compare
Choose a tag to compare

Fix Percent Encoded Paths Swift 5.7+

24 Nov 06:57
00e4d51
Compare
Choose a tag to compare
  • Fixes support for parsing and matching requests and routes with percent encoded paths. #74 Thanks @wirrareka
  • Drops support for Swift 5.5 and 5.6.

Fix crash in HTTPServer.stop()

24 Oct 07:19
8a20a97
Compare
Choose a tag to compare
  • Fixes a crash in HTTPServer.stop() ensuring socket is not closed twice #66
    🙏🏻 Thanks @samlapse

Fix Buffer leak

18 Aug 23:16
ed86fc6
Compare
Choose a tag to compare
  • Initial support Swift 5.9
  • Fixes a small buffer leak #62. 🙏🏻 Thanks @lhoward

Initial Support for Swift 5.9 & DiscardingTaskGroup

29 Jun 06:10
8b195ab
Compare
Choose a tag to compare
  • Adds support for Swift 5.9 and DiscardingTaskGroup (when available). #60
  • Xcode 15 Beta 2 support
  • Support image/x-icon, image/webp, image/jp2 Content-Type.