code: public CharSegment getHeaderBuffer(char []testBuf, int length)
    {
      char []keyBuf = _headerBuffer;
      CharSegment []headerKeys = _headerKeys;
      
      char []toLowerAscii = _toLowerAscii;
  
      for (int i = _headerSize - 1; i >= 0; i--) {
        CharSegment key = headerKeys[i];
  
        if (key.length() != length)
          continue;
  
        int offset = key.offset();
        int j;
        
        for (j = length - 1; j >= 0; j--) {
          char a = testBuf[j];
          char b = keyBuf[offset + j];
          
          if (a == b) {
            continue;
          }
          else if (toLowerAscii[a] != toLowerAscii[b]) {
            break;
          }
        }
  
        if (j < 0) {
          return _headerValues[i];
        }
      }
  
      return null;
    }
docs: Returns the matching header.
  
  @param testBuf header key
  @param length length of the key.