diff --git a/sources/org.osbuild.curl b/sources/org.osbuild.curl index 6a8293f2..05ee0781 100755 --- a/sources/org.osbuild.curl +++ b/sources/org.osbuild.curl @@ -163,7 +163,7 @@ class CurlSource(sources.SourceService): "--connect-timeout", "30", "--fail", "--location", - "--header", f"User-Agent: osbuild (Linux.{arch}; https://osbuild.org/)", + "--user-agent", f"osbuild (Linux.{arch}; https://osbuild.org/)", "--output", checksum, ] if proxy: diff --git a/sources/test/test_curl_source.py b/sources/test/test_curl_source.py index 47c7849c..9611df7f 100644 --- a/sources/test/test_curl_source.py +++ b/sources/test/test_curl_source.py @@ -222,6 +222,6 @@ def test_curl_user_agent(mocked_run, tmp_path, sources_service): for call_args in mocked_run.call_args_list: args, _kwargs = call_args - idx = args[0].index("--header") - assert "User-Agent: osbuild" in args[0][idx + 1] + idx = args[0].index("--user-agent") + assert "osbuild" in args[0][idx + 1] assert "https://osbuild.org/" in args[0][idx + 1]