Flush bad request and disconnect responses

Without flushing we will have empty response.

For example Nginx will return HTTP 502 Bad Gateway instead of correct response in such cases.