commit a655e85afdbbaa364ec9f8ca1236b18846d0775b from: Omar Polo date: Sat Dec 24 19:28:22 2022 UTC iri: fix logic in iri_unparse make sure path starts with "/" only when there's an authority part, not when it's not there! commit - 172e0e1e7163e57039bb99df7eeb6dab77d843c2 commit + a655e85afdbbaa364ec9f8ca1236b18846d0775b blob - 10224d035aea0c9d67c49a2ace47bfe4bc2f8972 blob + 331800323cf83091bef045c18098a5c25c7e35cb --- iri.c +++ iri.c @@ -668,7 +668,7 @@ iri_unparse(const struct iri *i, char *buf, size_t buf } if (i->iri_flags & IH_PATH) { - if (!(i->iri_flags & IH_AUTHORITY) && + if (i->iri_flags & IH_AUTHORITY && i->iri_path[0] != '/' && strlcat(buf, "/", buflen) >= buflen) goto err;