/** * The <code>isChunkable</code> method is used to determine if * the client supports chunked encoding. If the client does not * support chunked encoding then a connection close should be used * instead, this allows HTTP/1.0 clients to be supported properly. * * @return true if the client supports chunked transfer encoding */ public boolean isChunkable() { int major = request.getMajor(); int minor = request.getMinor(); if(major >= 1) { return minor >= 1; } return false; }
/** * The <code>isChunkable</code> method is used to determine if * the client supports chunked encoding. If the client does not * support chunked encoding then a connection close should be used * instead, this allows HTTP/1.0 clients to be supported properly. * * @return true if the client supports chunked transfer encoding */ public boolean isChunkable() { int major = request.getMajor(); int minor = request.getMinor(); if(major >= 1) { return minor >= 1; } return false; }
/** * The <code>isChunkable</code> method is used to determine if * the client supports chunked encoding. If the client does not * support chunked encoding then a connection close should be used * instead, this allows HTTP/1.0 clients to be supported properly. * * @return true if the client supports chunked transfer encoding */ public boolean isChunkable() { int major = request.getMajor(); int minor = request.getMinor(); if(major >= 1) { return minor >= 1; } return false; }
/** * This checks the protocol version used in the request to check * whether it supports persistent HTTP connections. By default the * HTTP/1.1 protocol supports persistent connnections, this can * onlyy be overridden with a Connection header with the close * token. Earlier protocol versions are connection close. * * @return this returns true if the protocol is HTTP/1.1 or above */ public boolean isPersistent() { String token = request.getValue(CONNECTION); if(token != null) { return token.equalsIgnoreCase(KEEP_ALIVE); } int major = request.getMajor(); int minor = request.getMinor(); if(major > 1) { return true; } if(major == 1) { return minor > 0; } return false; }
/** * This checks the protocol version used in the request to check * whether it supports persistent HTTP connections. By default the * HTTP/1.1 protocol supports persistent connnections, this can * onlyy be overridden with a Connection header with the close * token. Earlier protocol versions are connection close. * * @return this returns true if the protocol is HTTP/1.1 or above */ public boolean isPersistent() { String token = request.getValue(CONNECTION); if(token != null) { return token.equalsIgnoreCase(KEEP_ALIVE); } int major = request.getMajor(); int minor = request.getMinor(); if(major > 1) { return true; } if(major == 1) { return minor > 0; } return false; }
/** * This checks the protocol version used in the request to check * whether it supports persistent HTTP connections. By default the * HTTP/1.1 protocol supports persistent connnections, this can * onlyy be overridden with a Connection header with the close * token. Earlier protocol versions are connection close. * * @return this returns true if the protocol is HTTP/1.1 or above */ public boolean isPersistent() { String token = request.getValue(CONNECTION); if(token != null) { return token.equalsIgnoreCase(KEEP_ALIVE); } int major = request.getMajor(); int minor = request.getMinor(); if(major > 1) { return true; } if(major == 1) { return minor > 0; } return false; }