Fix body-writer exception causes hang
A sufficiently complex body-writer may not be able to complete writing the body, and the only practical approach is to throw an exception.
Exceptions are normally thrown from body-writers when the socket is closed by the remote peer.
If a Raw response body-writer throws an exception before completing the body the http session will be left out of sync and will hang indefinitely waiting to read the next request. The fix results in the socket being closed and not attempting to read the next request when an error occurs. If a content-length is provided then the network error can be detected by the remote peer, otherwise a truncated body is returned to the client.
branched from 1.5.0. Simply merging stable will resolve above conflicts.