diff --git a/cmk/update_config/http/migrate.py b/cmk/update_config/http/migrate.py index 09d2c59e02b..d43b766b852 100644 --- a/cmk/update_config/http/migrate.py +++ b/cmk/update_config/http/migrate.py @@ -143,6 +143,8 @@ def _migrate_url_params( return ( { **method, # TODO: Proxy sets this to CONNECT. + "http_versions": "http_1_1", # TODO: This preserves behaviour, v1 only allows for HTTP/1.1. or HTTP/1.0. + # However, for most customers this still might be undesirable. **tls_versions, **timeout, **user_agent, diff --git a/tests/unit/cmk/update_config/http/test_migrate.py b/tests/unit/cmk/update_config/http/test_migrate.py index c3c9c40f87e..7cfe7e0c029 100644 --- a/tests/unit/cmk/update_config/http/test_migrate.py +++ b/tests/unit/cmk/update_config/http/test_migrate.py @@ -1464,3 +1464,13 @@ def test_migrate_address_family(rule_value: Mapping[str, object], expected: obje # Assert assert ssc_value[0].settings.connection is not None assert ssc_value[0].settings.connection.address_family == expected + + +def test_preserve_http_version() -> None: + # Act + migrated = migrate(EXAMPLE_27) + # Assemble + ssc_value = parse_http_params(process_configuration_to_parameters(migrated).value) + # Assert + assert ssc_value[0].settings.connection is not None + assert ssc_value[0].settings.connection.http_versions == "http_1_1"