Skip to content

Commit

Permalink
Remove invalid assertion in writeJsonBody. Fixes vibe-d#788.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Aug 22, 2014
1 parent 1ce8cd3 commit e806708
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions source/vibe/http/server.d
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit e806708

Please sign in to comment.