@Override public FullHttpResponse setProtocolVersion(HttpVersion version) { headers.setProtocolVersion(version); return this; }
@Override public HttpResponse setProtocolVersion(HttpVersion version) { response.setProtocolVersion(version); return this; }
@Override public FullHttpResponse setProtocolVersion(HttpVersion version) { headers.setProtocolVersion(version); return this; }
/** * Chunked encoding is an HTTP 1.1 feature, but sometimes we get a chunked * response that reports its HTTP version as 1.0. In this case, we change it * to 1.1. * * @param httpResponse */ private void fixHttpVersionHeaderIfNecessary(HttpResponse httpResponse) { String te = httpResponse.headers().get( HttpHeaders.Names.TRANSFER_ENCODING); if (StringUtils.isNotBlank(te) && te.equalsIgnoreCase(HttpHeaders.Values.CHUNKED)) { if (httpResponse.getProtocolVersion() != HttpVersion.HTTP_1_1) { LOG.debug("Fixing HTTP version."); httpResponse.setProtocolVersion(HttpVersion.HTTP_1_1); } } }
/** * Chunked encoding is an HTTP 1.1 feature, but sometimes we get a chunked * response that reports its HTTP version as 1.0. In this case, we change it * to 1.1. * * @param httpResponse */ private void fixHttpVersionHeaderIfNecessary(HttpResponse httpResponse) { String te = httpResponse.headers().get( HttpHeaders.Names.TRANSFER_ENCODING); if (StringUtils.isNotBlank(te) && te.equalsIgnoreCase(HttpHeaders.Values.CHUNKED)) { if (httpResponse.getProtocolVersion() != HttpVersion.HTTP_1_1) { LOG.debug("Fixing HTTP version."); httpResponse.setProtocolVersion(HttpVersion.HTTP_1_1); } } }
/** * Chunked encoding is an HTTP 1.1 feature, but sometimes we get a chunked * response that reports its HTTP version as 1.0. In this case, we change it * to 1.1. * * @param httpResponse */ private void fixHttpVersionHeaderIfNecessary(HttpResponse httpResponse) { String te = httpResponse.headers().get( HttpHeaders.Names.TRANSFER_ENCODING); if (StringUtils.isNotBlank(te) && te.equalsIgnoreCase(HttpHeaders.Values.CHUNKED)) { if (httpResponse.getProtocolVersion() != HttpVersion.HTTP_1_1) { LOG.debug("Fixing HTTP version."); httpResponse.setProtocolVersion(HttpVersion.HTTP_1_1); } } }