Vapor v4.7.0 Release Notes
Release Date: 2020-05-27 // almost 4 years ago-
๐ ###### 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.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 thebody.drain
closure (#2357).