protected boolean requestVersionIsTooLow(final HttpRequest request) { final ProtocolVersion requestProtocol = request.getVersion(); return requestProtocol != null && requestProtocol.compareToVersion(HttpVersion.HTTP_1_1) < 0; }
private void transferEncodingIsNotReturnedTo1_0Client( final HttpRequest originalRequest, final HttpResponse response) { final ProtocolVersion version = originalRequest.getVersion() != null ? originalRequest.getVersion() : HttpVersion.DEFAULT; if (version.compareToVersion(HttpVersion.HTTP_1_1) >= 0) { return; } removeResponseTransferEncoding(response); }
if (version.compareToVersion(HttpVersion.HTTP_1_1) > 0) { if (log.isDebugEnabled()) { log.debug("Protocol version " + version + " is non-cacheable");
/** * Tests if this protocol version is less or equal to the given one. * * @param version the version against which to check this version * * @return {@code true} if this protocol version is * {@link #isComparable comparable} to the argument * and {@link #compareToVersion compares} as less or equal, * {@code false} otherwise */ public final boolean lessEquals(final ProtocolVersion version) { return isComparable(version) && (compareToVersion(version) <= 0); }
/** * Tests if this protocol version is less or equal to the given one. * * @param version the version against which to check this version * * @return {@code true} if this protocol version is * {@link #isComparable comparable} to the argument * and {@link #compareToVersion compares} as less or equal, * {@code false} otherwise */ public final boolean lessEquals(final ProtocolVersion version) { return isComparable(version) && (compareToVersion(version) <= 0); }
/** * Tests if this protocol version is greater or equal to the given one. * * @param version the version against which to check this version * * @return {@code true} if this protocol version is * {@link #isComparable comparable} to the argument * and {@link #compareToVersion compares} as greater or equal, * {@code false} otherwise */ public final boolean greaterEquals(final ProtocolVersion version) { return isComparable(version) && (compareToVersion(version) >= 0); }
/** * Tests if this protocol version is greater or equal to the given one. * * @param version the version against which to check this version * * @return {@code true} if this protocol version is * {@link #isComparable comparable} to the argument * and {@link #compareToVersion compares} as greater or equal, * {@code false} otherwise */ public final boolean greaterEquals(final ProtocolVersion version) { return isComparable(version) && (compareToVersion(version) >= 0); }
protected boolean requestVersionIsTooLow(final HttpRequest request) { final ProtocolVersion requestProtocol = request.getVersion(); return requestProtocol != null && requestProtocol.compareToVersion(HttpVersion.HTTP_1_1) < 0; }
private void transferEncodingIsNotReturnedTo1_0Client( final HttpRequest originalRequest, final HttpResponse response) { final ProtocolVersion version = originalRequest.getVersion() != null ? originalRequest.getVersion() : HttpVersion.DEFAULT; if (version.compareToVersion(HttpVersion.HTTP_1_1) >= 0) { return; } removeResponseTransferEncoding(response); }
if (version.compareToVersion(HttpVersion.HTTP_1_1) > 0) { if (log.isDebugEnabled()) { log.debug("Protocol version " + version + " is non-cacheable");