public Path withTrailingSlash() {
            return new Path(head, length, true, validator);
        }
Returns a copy of this which encodes a trailing slash.
vespajlib/src/main/java/ai/vespa/http/HttpURL.java