private boolean responseHeaderProtocolNotPassed(ByteBuffer buffer) {
        String headerProtocol = new String(buffer.array(), buffer.position(),
                buffer.position() + 8);
        for (HttpProtocol protocol : HttpProtocol.values()) {
            if (protocol == HttpProtocol.UNKNOWN || protocol == HttpProtocol.H2_PRIOR_KNOWLEDGE
                    || protocol == HttpProtocol.SPDY_3 || protocol == HttpProtocol.QUIC) {
                continue;
            }
            if (headerProtocol.startsWith(protocol.toString())) {
                return false;
            }
        }
        NetBareLog.w("Unknown response header protocol : " + headerProtocol);
        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