@Override public int hashCode() { int hashCode = 0; if (version != null) { hashCode ^= version.hashCode(); } if (headers != null) { hashCode ^= headers.hashCode(); } if (cookies != null) { hashCode ^= cookies.hashCode(); } if (content != null) { hashCode ^= content.hashCode(); } return hashCode; }
@Override protected DecodingState finishDecode(IoBuffer buffer, ProtocolDecoderOutput out) throws Exception { if (!buffer.hasRemaining()) { return this; } String httpVersion = buffer.getString(US_ASCII_DECODER); out.write(HttpVersion.valueOf(httpVersion .replaceAll("\\/|\\.", "_"))); return AFTER_READ_VERSION; }
public static boolean isChunked(HttpResponseMessage response) { String transferEncoding = response.getHeader("Transfer-Encoding"); return isChunked(transferEncoding) && HttpVersion.HTTP_1_1.equals(response.getVersion()); }
if (acceptSession.getVersion().toString().equals("HTTP/1.0")) { if (this.serviceName != null) { LOGGER.warn(String.format(
@Override protected DecodingState finishDecode(IoBuffer buffer, ProtocolDecoderOutput out) throws Exception { String httpVersion = buffer.getString(asciiDecoder); if(httpVersion.startsWith("HTTP/") && httpVersion.length() == 8 && !(httpVersion.charAt(5)== '1')) { httpVersion = "HTTP/1.1"; throw new HttpProtocolDecoderException(HttpStatus.SERVER_VERSION_NOT_SUPPORTED); } HttpVersion version; try { version = HttpVersion.valueOf(httpVersion .replaceAll("\\/|\\.", "_")); } catch(IllegalArgumentException e) { throw new HttpProtocolDecoderException(HttpStatus.CLIENT_BAD_REQUEST); } out.write(version); return AFTER_READ_VERSION; }