code: public static Buffer[] consumeGenericParam(final Buffer buffer) throws IndexOutOfBoundsException, IOException {
          final Buffer key = consumeToken(buffer);
          Buffer value = null;
          if (key == null) {
              return new Buffer[2];
          }
          if (consumeEQUAL(buffer) > 0) {
              // TODO: consume host and quoted string
              if (isNext(buffer, DOUBLE_QOUTE)) {
                  value = consumeQuotedString(buffer);
              } else {
                  value = consumeToken(buffer);
              }
          }
          return new Buffer[] {
                  key, value };
      }
docs: Consumes a generic param, which according to RFC 3261 section 25.1 is:
  
  <pre>
  generic-param  =  token [ EQUAL gen-value ]
  gen-value      =  token / host / quoted-string
  </pre>
  
  The return value is two buffers returned as an array and if the second
  element is null (so make sure you check it!) then there was no value for
  this parameter.
  
  Also note that due to poor implementations out there, the following is
  accepted as valid input:
  
  foo=
  
  I.e., foo is a flag parameter and as such there should not be an equal
  sign following it but there are many servers out there that does this
  anyway.
  
  @param buffer
  the buffer from which we will consume a generic-param
  @return a buffer array of size two. The first element is the name of the
  parameter and the second element is the value of that parameter
  or null if the parameter was a flag parameter (didn't have a
  value)
  @throws IOException
  @throws IndexOutOfBoundsException