private boolean requestHeaderMethodNotPassed(ByteBuffer buffer) {
        String headerMethod = new String(buffer.array(), buffer.position(),
                buffer.position() + 7);
        for (HttpMethod method : HttpMethod.values()) {
            if (method == HttpMethod.UNKNOWN) {
                continue;
            }
            if (headerMethod.startsWith(method.name())) {
                return false;
            }
        }
        NetBareLog.w("Unknown request header method : " + headerMethod);
        return true;
    }
Detect the plaintext packet header to determine is it the HTTP protocol.

@author Megatron King
@since 2019/1/31 16:13
netbare-core/src/main/java/com/github/megatronking/netbare/http/HttpHeaderSniffInterceptor.java