- Save prev_len after having checked for and appended a trailing slash, not before. This requires us to back up if we end up returning a partial result, but previously we would sometimes return a partial result with a trailing slash and sometimes without.
- Replace strlcat() with a faster strlcpy() since we know exactly how far into the buffer we are.
MFC after: 1 week
Sponsored by: Klara, Inc.