code: private static int findEndOfHeaders(byte[] data) {
      for (int i = 0; i < data.length - 3; i++) {
        if (data[i] != CRLF[0] || data[i + 1] != CRLF[1] || data[i + 2] != CRLF[0] || data[i + 3] != CRLF[1]) {
          continue;
        }
        // Headers finish here
        return i;
      }
      return -1;
    }
docs: Find the index matching the end of the header data.
  
  @param data the request data
  @return the index if found, -1 otherwise