Vapor: 4.7.0 Release

Release date:
May 27, 2020
Previous version:
4.6.0 (released May 26, 2020)
Magnitude:
260 Diff Delta
Contributors:
1 total committer
Data confidence:
Commits:

Top Contributors in 4.7.0

tanner0101

Directory Browser for 4.7.0

We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.

Release Notes Published

This patch was authored and released by @tanner0101.
  • Implements new state machine for handling streaming request bodies (#2357).

This new state machine ensures that calls to req.body.drain will only ever happen after the previously returned future has completed. This makes it easier to correctly implement streaming file writes. Addresses https://forums.swift.org/t/how-to-use-nonblockingfileio-for-repeated-writes/36206.

  • Request bodies are now automatically drained after sending a response (#2357, fixes #2356).

This change ensures that streaming requests will be read completely even if a route ignores their body.

  • Adds a streaming file upload example to the Development executable (#2357).

  • Improves BodyStreamResult's normal and debug descriptions (#2357).

  • Fixed a reference cycle if Request was captured strongly within the body.drain closure (#2357).