Commit Diff
--- libexec/got-fetch-http/got-fetch-http.c +++ libexec/got-fetch-http/got-fetch-http.c @@ -170,7 +170,7 @@ http_open(struct bufio *bio, int https, const char *me if (ctype) chdr = "Content-Type: "; - r = asprintf(&p, "/%s%s%s%s", path, path_sufx, + r = asprintf(&p, "%s/%s%s%s", path, path_sufx, query ? "?" : "", query ? query : ""); if (r == -1) err(1, "asprintf");