response.getResponseHeader().setProtocol(getRequest().getProtocol());
response.getResponseHeader().setHeader("Connection", "close");
}
}
} catch (Exception e) {
HttpResponse errorResponse = null;
if (HttpUtils.isShowDetailedError()) {
errorResponse = new HttpResponse(400, "text/html", generateErrorMessageHtml(400, DataConverter.toString(e), getId()));
} else {
errorResponse = new HttpResponse(400, "text/html", generateErrorMessageHtml(400, HttpUtils.getReason(400), getId()));
}
setResponseCommited(true);
HttpServerConnection.this.sendResponseMessage(errorResponse);
throw new IOException(e.toString());
}