final HeaderMap outboundResponseHeaders = exchange.getResponseHeaders();
exchange.setResponseCode(response.getResponseCode());
copyHeaders(outboundResponseHeaders, inboundResponseHeaders);
if (exchange.isUpgrade()) {
exchange.upgradeChannel(new ExchangeCompletionListener() {
@Override
public void exchangeEvent(final HttpServerExchange exchange, final NextListener nextListener) {
StreamConnection clientChannel = null;
final HttpServerConnection connection = (HttpServerConnection) exchange.getConnection();
try {