From f9f3e6ccc66cd4f2becfc29e6b2b74beaddf14e6 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Tue, 2 Dec 2025 21:21:58 +0100 Subject: [PATCH] support/scripts/pkg-stats: check_url_status(): use HEAD requests to limit server load The gnu.org admins have been blocking the IP address of machines running pkg-stats as the GET requests for the (many) packages with gnu.org URLs are seen as abusive. The resource body is not used, so use a HTTP HEAD request instead of a GET to limit server load and bandwidth use. Signed-off-by: Peter Korsgaard Signed-off-by: Julien Olivain --- support/scripts/pkg-stats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats index cfea179458..c659acb80e 100755 --- a/support/scripts/pkg-stats +++ b/support/scripts/pkg-stats @@ -469,7 +469,7 @@ async def check_url_status(session, pkg, npkgs, retry=True, verbose=False): global check_url_count try: - async with session.get(pkg.url) as resp: + async with session.head(pkg.url) as resp: if resp.status >= 400: pkg.status['url'] = ("error", "invalid {}".format(resp.status)) check_url_count += 1