key->len doesn't include trailing space anymore