commit 1bce54cf7c1889402aca9736b413efdb45ed1b71 from: Christian Weisgerber via: Thomas Adam date: Mon Apr 29 12:22:32 2024 UTC got-fetch-http: fix GET request URL Add a leading '/' and do not produce a double "//" after the path. ok op commit - 3779dc8f300635352ce960e273f33f50177b83aa commit + 1bce54cf7c1889402aca9736b413efdb45ed1b71 blob - 43858a3fc70b77963b5985f1bf6470bb24429296 blob + 1d2b80dcbade71b2486c8d78498c7c5eb877e037 --- 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");