code: private int getIndex(CharSequence name) {
          if (length() == 0 || name == null) {
              return -1;
          }
          int h = AsciiString.hashCode(name);
          int i = index(h);
          for (HeaderEntry e = headerFields[i]; e != null; e = e.next) {
              if (e.hash == h && equalsConstantTime(name, e.name) != 0) {
                  return getIndex(e.index);
              }
          }
          return -1;
      }
docs: Returns the lowest index value for the header field name in the dynamic table. Returns -1 if
  the header field name is not in the dynamic table.