Vapor v4.0.2 Release Notes
Release Date: 2020-04-14 // about 4 years ago-
๐ ###### This patch was authored and released by @tanner0101.
๐ Improves logic for handling HEAD responses (#2310).
Previously when HEAD requests were detected, the response body would be replaced with an empty body and the
content-length
header would be re-added. This caused problems with responses that don't use thecontent-length
header, even for non-HEAD requests.๐ฆ Now, when HEAD requests are detected, the response body is not changed. Instead, a flag is set signaling the serializer to skip serialization of the body.