From: Carlo Marcelo Arenas Belón Date: Fri, 24 Apr 2020 04:50:30 GMT Subject: Re: [PATCH v2] credential: fix matching URLs with multiple levels in path Message-ID: <20200424045030.GA44448@Carlos-MBP> In-Reply-To: <20200422195109.2224035-1-sandals@crustytoothpaste.net> On Wed, Apr 22, 2020 at 07:51:09PM +0000, brian m. carlson wrote: > --- a/strbuf.h > +++ b/strbuf.h > @@ -378,11 +378,15 @@ size_t strbuf_expand_dict_cb(struct strbuf *sb, > */ > void strbuf_addbuf_percentquote(struct strbuf *dst, const struct strbuf *src); > > +#define STRBUF_PERCENTENCODE_PATH 1 > + > /** > * Append the contents of a string to a strbuf, percent-encoding any characters > * that are needed to be encoded for a URL. > + * > + * If STRBUF_PERCENTENCODE_PATH is set in flags, don't percent-encode slashes. > */ wouldn't it be better to call this STRBUF_PERCENTENCODE_SLASH instead?, since it is actually not applied to path? Carlo