fix content length, and let servlet container flush and close the output stream for us (it owns the stream)