0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-28 00:14:07 +01:00

ircd::server: Preserve nullity of cancellation tag's in.content.

This commit is contained in:
Jason Volk 2018-04-26 21:09:49 -07:00
parent 412c12fd69
commit 9c5b10fb61

View file

@ -1867,8 +1867,14 @@ noexcept
ptr += size(in_head); ptr += size(in_head);
const mutable_buffer in_content{ptr, size(request.in.content)}; const mutable_buffer in_content{ptr, size(request.in.content)};
tag.request->in.content = in_content; // The nullity (btw that's a real word) of in.content has to be preserved
ptr += size(in_content); // between the user's tag and the cancellation tag. This is important for
// a dynamic chunked encoded response which has null in.content until done.
if(!null(request.in.content))
{
tag.request->in.content = in_content;
ptr += size(in_content);
}
assert(size_t(std::distance(tag.cancellation.get(), ptr)) == cancellation_size); assert(size_t(std::distance(tag.cancellation.get(), ptr)) == cancellation_size);