Vapor Versions Save

๐Ÿ’ง A server-side Swift HTTP web framework.

4.95.0

2 weeks ago

What's Changed

Add support for asynchronous body stream writing by @Joannis in #2998

  • Fixes #2930 - a crash when users try to write a body from within a task towards the ELF APIs.
  • Introduces a new API for writing chunked HTTP response bodies
  • Adds a helper that automatically manages failing and closing streams
This patch was released by @0xTim

Full Changelog: https://github.com/vapor/vapor/compare/4.94.1...4.95.0

4.94.1

3 weeks ago

What's Changed

Patch configuration and log actual port on startup by @bisgardo in #3160

Before this change, the application

let app = Application(.testing)
defer { app.shutdown() }
try app.server.start(hostname: nil, port: 0)
defer { app.server.shutdown() }

would log the following message before starting the server:

[Vapor] Server starting on http://127.0.0.1:0

After this change it instead logs a message like the following after starting the server:

[Vapor] Server starting on http://127.0.0.1:57935

The input configuration is also patched such that app.http.server.configuration.port will hold the actual port after startup. Currently if it has value 0 it will keep that value (only app.http.server.shared.localAddress?.port will have the correct one).

Fixes #3159.

Reviewers

Thanks to the reviewers for their help:

  • @dimitribouniol
This patch was released by @0xTim

Full Changelog: https://github.com/vapor/vapor/compare/4.94.0...4.94.1

4.94.0

3 weeks ago

What's Changed

Migrate to Async NIOFileIO APIs by @0xTim in #3167

This migrates collectFile(at:) and writeFile(_:at:) to use NIOโ€™s async NIOFileIO APIs introduced in https://github.com/apple/swift-nio/releases/tag/2.63.0

Also adds a new API for streaming files using a AsyncSequence based on the new NIOFileSystem.

This work is required to move the DotEnv support over to an async API to avoid calling wait()s in an async context which can cause issues

Reviewers

Thanks to the reviewers for their help:

  • @ptoffy
This patch was released by @0xTim

Full Changelog: https://github.com/vapor/vapor/compare/4.93.2...4.94.0

4.93.2

3 weeks ago

What's Changed

Removed streamFile deprecation + deactivated advancedETagComparison by default by @linus-hologram in #3177

As discussed on Discord, this PR removes the deprecation and deactivates the lately introduced advanced ETag Comparison for the time being while the revised implementation is worked on.

New Contributor

  • @linus-hologram made their first contribution in #3177 ๐ŸŽ‰
This patch was released by @0xTim

Full Changelog: https://github.com/vapor/vapor/compare/4.93.1...4.93.2

4.93.1

3 weeks ago

What's Changed

Remove HeadResponder by @baarde in #3147

The HEAD method is identical to GET except that the server must not send content in the response (RFC 9110, section 9.3.2).

The previous default behaviour of returning 200 OK to every HEAD request to a constant route is not standard-compliant.

The new behaviour is to always forward the request to the GET route, unless the developer explicitely configured a custom HEAD route.

This PR fixes #2680 and #2749.

New Contributor

  • @baarde made their first contribution in #3147 ๐ŸŽ‰
This patch was released by @0xTim

Full Changelog: https://github.com/vapor/vapor/compare/4.93.0...4.93.1

4.93.0

3 weeks ago

What's Changed

Advanced ETag Comparison now supported by @linus-hologram in #3015

Vapor now supports strong (byte-by-byte) ETag validation and caches ETags for rapid responses. This provides a stronger alternative to the current weak comparison, which only guarantees semantic file equivalence. This new strong comparison is enabled by default and can be deactivated during FileMiddleware initialization if needed. This PR closes #2948.

  • streamFile method was deprecated and replaced by an alternative returning an EventLoopFuture
  • vaporโ€™s unit tests were updated to reflect the changes
  • documentation was updated to reflect the changes

New Contributor

  • @linus-hologram made their first contribution in #3015 ๐ŸŽ‰

Reviewers

Thanks to the reviewers for their help:

  • @vzsg
This patch was released by @gwynne

Full Changelog: https://github.com/vapor/vapor/compare/4.92.9...4.93.0

4.92.9

3 weeks ago

What's Changed

Enabled Request Decompression By Default by @dimitribouniol in #3175

This enables request decompression by default and sets the decompression limit to 25ร—.

New Contributor

  • @dimitribouniol made their first contribution in #3175 ๐ŸŽ‰

Reviewers

Thanks to the reviewers for their help:

  • @MahdiBM
This patch was released by @gwynne

Full Changelog: https://github.com/vapor/vapor/compare/4.92.8...4.92.9

4.92.8

4 weeks ago

What's Changed

HTTP2 Response Compression/Request Decompression by @dimitribouniol in #3126

Fixed an issue where HTTP2 didnโ€™t support response compression and request decompression.

It seems like it may have been omitted when adding explicit support for HTTP2. Not sure what to do about testing as I couldnโ€™t find any tests for the HTTP1.1 pathway, but I did verify it works in my pet project ๐Ÿ˜…

Fixes #3125

New Contributor

  • @dimitribouniol made their first contribution in #3126 ๐ŸŽ‰
This patch was released by @0xTim

Full Changelog: https://github.com/vapor/vapor/compare/4.92.7...4.92.8

4.92.7

1 month ago

What's Changed

Don't set ignore status for SIGTERM and SIGINT on Linux by @gwynne in #3174

Changes the behavior of ServeCommandโ€™s signal handling setup to more closely match that of swift-service-lifecycle. Hopefully finally solves #2502 ๐Ÿคž

This patch was released by @gwynne

Full Changelog: https://github.com/vapor/vapor/compare/4.92.6...4.92.7

4.92.6

1 month ago

What's Changed

Fix typos across the codebase by @mrs1669 in #3162

Fixes a number of typos in the codebase.

โš ๏ธ the logger for loading environment files now has the correctly spelt label - dot-env-logger if you need to search for that

New Contributor

  • @mrs1669 made their first contribution in #3162 ๐ŸŽ‰

Reviewers

Thanks to the reviewers for their help:

  • @dimitribouniol
This patch was released by @0xTim

Full Changelog: https://github.com/vapor/vapor/compare/4.92.5...4.92.6