Skip to content

New HTTPBodySequence

Compare
Choose a tag to compare
@swhitty swhitty released this 16 Aug 07:34
· 97 commits to main since this release
f7829d4

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