Vapor: 4.11.0 Release

Release date:
June 24, 2020
Previous version:
4.10.3 (released June 24, 2020)
Magnitude:
0 Diff Delta
Contributors:
0 total committers
Data confidence:
Commits:

Top Contributors in 4.11.0

Could not determine top contributors for this release.

Directory Browser for 4.11.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.

Improves HTTP request and response streaming (#2404).

  • Streaming request body skipping will only happen if the entire response has been sent before the user starts reading the request body (fixes #2393).

Note: Previously, streaming request bodies would be drained automatically by Vapor as soon as the response head was sent. This made it impossible to implement realtime streaming, like an echo server. With these changes, you have much more control over streaming HTTP while still preventing hanging if the request body is ignored entirely.

  • Response body stream now supports omitting the count parameter (fixes #2393).

Note: Previously streaming bodies required a count and would always set the content-length header. Now, setting a count of -1 indicates a stream with indeterminate length. -1 will be used if the stream count is omitted. This results in transfer-encoding: chunked being used automatically.

  • Response writer provides a better error message if stream is never ended (fixes #2390).

  • Fixes an issue causing EOF framing to result in promise leak (fixes #2391).

  • Response streams with determinate length that write too few or too many bytes will now result in an error (fixes #2392).