try {
IHttpRequestLine requestLine = requestLineParser.parse(is);
IHttpHeaders httpHeaders = headersParser.parse(is);
if (requestLine.getVersion().isHTTP11() && !httpHeaders.contains("host")) {
throw new HttpException(HttpStatusCode.STATUS_400_BAD_REQUEST, "HTTP/1.1 request without host header.");
}
httpRequest = new HttpRequest(httpHeaders);
httpRequest.setMethod(requestLine.getMethod());