diff --git a/source/vibe/http/server.d b/source/vibe/http/server.d index bebf059a16..f16c6f9339 100644 --- a/source/vibe/http/server.d +++ b/source/vibe/http/server.d @@ -839,17 +839,10 @@ final class HTTPServerResponse : HTTPResponse { auto counter = RangeCounter(&length); serializeToJson(counter, data); headers["Content-Length"] = formatAlloc(m_requestAlloc, "%d", length); - - { - auto rng = StreamOutputRange(bodyWriter); - serializeToJson(&rng, data); - } - - assert(this.bytesWritten == length); - } else { - auto rng = StreamOutputRange(bodyWriter); - serializeToJson(&rng, data); } + + auto rng = StreamOutputRange(bodyWriter); + serializeToJson(&rng, data); } /**