mirror of
https://github.com/matrix-construct/construct
synced 2024-09-28 19:58:53 +02:00
ircd::http: Fix serial size case with empty vector.
This commit is contained in:
parent
3b1cc75f10
commit
96eca6c744
1 changed files with 1 additions and 2 deletions
|
@ -767,8 +767,7 @@ ircd::http::serialized(const vector_view<const header> &headers)
|
|||
{
|
||||
// Because the write(header) functions use fmt::sprintf we have to
|
||||
// indicate an extra space for a null string terminator to not overlof
|
||||
static const size_t initial{1};
|
||||
|
||||
const size_t initial{!headers.empty()};
|
||||
return std::accumulate(std::begin(headers), std::end(headers), initial, []
|
||||
(auto &ret, const auto &pair)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue