Some minor changes in api of http_handler (more meaningful names of methods and constructor for http_response). Also added check if upstream is already closed in 'error' method because sending error to closed upstream leads in exception, but in asynchronous applications it's difficult to control how many times we want to response (for example we want send error on timed out answer from service and on error from service, and error from service will be received after timeout).