From d9197ef7190cb428763c375cd10df13f0efcd661 Mon Sep 17 00:00:00 2001 From: JGZYES Date: Tue, 1 Sep 2026 17:47:06 +0800 Subject: [PATCH] install: accept non-404 bodies (robust to curl status-marker variations on some Linux) --- src/install.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/install.c b/src/install.c index 4118ca1..2817544 100644 --- a/src/install.c +++ b/src/install.c @@ -351,7 +351,10 @@ int install_from_registry(const char *name, const char *spec, const char *mirror snprintf(url, sizeof(url), "%s/%s.json", bases[i], name); printf("pmm: looking up %s in mirror %s\n", name, bases[i]); body = http_get(url, &status); - if (body && status == 200) { used_base = bases[i]; break; } + /* accept any body that isn't an explicit not-found/server error; some + * curl builds don't emit the status marker the way we expect, so a + * non-NULL body with an indeterminate status should still be parsed */ + if (body && status != 404 && status != 403 && status != 503) { used_base = bases[i]; break; } free(body); body = NULL; } if (!body) {