final HttpRequest request) throws IOException, HttpException {
HttpContext context = conn.getContext();
HttpVersion ver = request.getRequestLine().getHttpVersion();
if (!ver.lessEquals(HttpVersion.HTTP_1_1)) {
// Downgrade protocol version if greater than HTTP/1.1
ver = HttpVersion.HTTP_1_1;
}
HttpResponse response = this.responseFactory.newHttpResponse(ver, HttpStatus.SC_OK, conn.getContext());