From nobody Sun Jul 26 13:31:12 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=yandex.ru ARC-Seal: i=1; a=rsa-sha256; t=1781697819; cv=none; d=zohomail.com; s=zohoarc; b=JvdLhWS5M596pVhV3PM7/wM5JBGGwWO7EANfCEuDCGaROra+Iv2zpRCBxS0MAru5imawMwJ1w1Usj2lCq27rO/MT2FiGCHoJuXxaqxgLSkdEiELLThwLzzn+OSedigvjBudQJfuV1/8IvA0KoetTh1Xgn+NKQTLvs7ERU9qxTKc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781697819; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=EVaD91U778GPavlRVIBviv08gdBWzqmegGsObBePI6A=; b=kp52XXDP340nDcgYscZS/8ELQFRLYjrgGJxM4Zqqhoct1azf2GbLmWcSY/QJCqiv2SNrlyebbDp0mDfO6AGyGgSrmE9FB4RK/V0Gh93vv1UbMdAklishIZF6NQg51pfaBUFipShIxLgYjNN8Wb1r4TU9X/vaMulKsl0BSdxRiPE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781697818860482.13017181812086; Wed, 17 Jun 2026 05:03:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZozA-0004Xr-GD; Wed, 17 Jun 2026 08:03:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZmqR-0005v6-MH; Wed, 17 Jun 2026 05:46:03 -0400 Received: from forward100a.mail.yandex.net ([2a02:6b8:c0e:500:1:45:d181:d100]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZmqP-0002N2-Gw; Wed, 17 Jun 2026 05:46:03 -0400 Received: from mail-nwsmtp-smtp-production-main-64.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-64.vla.yp-c.yandex.net [IPv6:2a02:6b8:c1d:713f:0:640:12cb:0]) by forward100a.mail.yandex.net (Yandex) with ESMTPS id 08BEDC06EA; Wed, 17 Jun 2026 12:45:54 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-64.vla.yp-c.yandex.net (smtp) with ESMTPSA id ojNjJbpeaiE0-EMZIIV2J; Wed, 17 Jun 2026 12:45:53 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1781689553; bh=EVaD91U778GPavlRVIBviv08gdBWzqmegGsObBePI6A=; h=Message-ID:Date:Cc:Subject:To:From; b=KxB5rzlEutMzwkrbWQ6HQc4LPLnA1XdfWvI4XFcfjzjUmfWd01M6EEKgfUPKHay/R kp+fN0TsZlnax9sjrPgXDFlY8NqZbaNKkApKA6It9QvQULOCjpsaUDUqky1LERocMP J4nvBAJ/nh06+hkqbBMYrRPV8wPQHgXOObuGOnFg= Authentication-Results: mail-nwsmtp-smtp-production-main-64.vla.yp-c.yandex.net; dkim=pass header.i=@yandex.ru From: Vladimir Lobanov To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, kwolf@redhat.com, hreitz@redhat.com, qemu-trivial@nongnu.org, Vladimir Lobanov Subject: [PATCH] block/curl: set User-Agent header Date: Wed, 17 Jun 2026 12:44:56 +0300 Message-ID: <20260617094456.94880-1-lobanov-vla@yandex.ru> X-Mailer: git-send-email 2.50.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a02:6b8:c0e:500:1:45:d181:d100; envelope-from=lobanov-vla@yandex.ru; helo=forward100a.mail.yandex.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 17 Jun 2026 08:02:38 -0400 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @yandex.ru) X-ZM-MESSAGEID: 1781697820967158500 Content-Type: text/plain; charset="utf-8" Some HTTP servers and WAFs (e.g. Amazon CloudFront) reject requests without a User-Agent header with 403 Forbidden. This makes qemu-img info and other curl-based operations fail on such URLs without any obvious indication of the root cause. Set a "QEMU/" User-Agent string on all curl handles to ensure compatibility with these endpoints. Signed-off-by: Vladimir Lobanov --- block/curl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/curl.c b/block/curl.c index 684c677ef7..1958eb80d1 100644 --- a/block/curl.c +++ b/block/curl.c @@ -482,6 +482,8 @@ static int curl_init_state(BDRVCURLState *s, CURLState = *state) } } if (curl_easy_setopt(state->curl, CURLOPT_TIMEOUT, (long)s->timeou= t) || + curl_easy_setopt(state->curl, CURLOPT_USERAGENT, + "QEMU/" QEMU_VERSION) || curl_easy_setopt(state->curl, CURLOPT_WRITEFUNCTION, (void *)curl_read_cb) || curl_easy_setopt(state->curl, CURLOPT_WRITEDATA, (void *)state= ) || --=20 2.50.1 (Apple Git-155)