}
@Override
public void completed(final ClientExchange result) {
HttpServerExchange exchange = result.getAttachment(EXCHANGE);
final ClientResponse response = result.getResponse();
final HeaderMap inboundResponseHeaders = response.getResponseHeaders();
final HeaderMap outboundResponseHeaders = exchange.getResponseHeaders();
exchange.setResponseCode(response.getResponseCode());
copyHeaders(outboundResponseHeaders, inboundResponseHeaders);
if (exchange.isPersistent() && !result.getConnection().isOpen()) {
//just because the client side is non-persistent it does not mean we want to close the connection to
//the backend
outboundResponseHeaders.put(Headers.CONNECTION, "keep-alive");