I have written a custom web server using sockets. I do not use mono-xsp.
If the property System.Web.HttpResponse.BufferOutput is set to false and a file is send using System.Web.HttpResponse.BinaryWrite() afterwards, then no chunked encoding is applied any more. Web browsers receive invalid data. If BufferOutput is set to true, everything works fine.
In .NET, chunked encoding is applied in both cases - if BufferOutput is set to true as well as if it is set to false.
httpResponse.BufferOutput = false; // this will fail