From 5cd86e272f28b4a204bdf19d6573e3b7cd68e663 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 22 May 2023 18:47:00 +0200 Subject: [PATCH] input/curl: disable `CURLOPT_FAILONERROR` Let OnHeaders() check the status. The status checking code was added by commit 4f021cbced19dfc6 in 2011, but in 2008, commit a8e81326d0 enabled `CURLOPT_FAILONERROR`, which means the status checking code never had any effect. This allows `LoadExcludeListOrLog()` to hide boring "404 Not Found" log messages via `IsFileNotFound()`. --- NEWS | 1 + src/input/plugins/CurlInputPlugin.cxx | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index cd9636d6f..5d57af4a6 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ ver 0.23.13 (not yet released) * input - curl: fix busy loop after connection failed + - curl: hide "404" log messages for non-existent ".mpdignore" files * archive - zzip: fix crash bug * database diff --git a/src/input/plugins/CurlInputPlugin.cxx b/src/input/plugins/CurlInputPlugin.cxx index e90ce8daf..e7a766658 100644 --- a/src/input/plugins/CurlInputPlugin.cxx +++ b/src/input/plugins/CurlInputPlugin.cxx @@ -417,7 +417,6 @@ CurlInputStream::InitEasy() request->SetOption(CURLOPT_HTTP200ALIASES, http_200_aliases); request->SetOption(CURLOPT_FOLLOWLOCATION, 1L); request->SetOption(CURLOPT_MAXREDIRS, 5L); - request->SetOption(CURLOPT_FAILONERROR, 1L); /* this option eliminates the probe request when username/password are specified */