NancyFx/Nancy — pull request #1706 by canton7 (2014-09-28 09:48:02+00:00)
Title: Significantly reduce DefaultObjectSerialization output length in some cases

...ses

MemoryStream's internal buffer can be quite a bit longer than the length
of the data inside it, which is an optimization. However, this doesn't
mean that DefaultObjectSerializer should output all of these empty bytes
at the end (which appear as "AAAAAA" etc).

Instead, just output that segment of the buffer which actually contains
data.