context.setAttribute(HttpExecutionContext.HTTP_CONNECTION, conn);
HttpResponse response;
try {
HttpRequest request = conn.receiveRequestHeader(this.params);
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;
}
response = this.responseFactory.newHttpResponse(ver, HttpStatus.SC_OK);