From: Remi Gacogne Date: Tue, 6 May 2025 13:07:31 +0000 (+0200) Subject: dnsdist: Deprecate the `options` parameter of `HTTPStatusAction` X-Git-Tag: dnsdist-2.0.0-alpha2~25^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F15526%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Deprecate the `options` parameter of `HTTPStatusAction` As noted in #14791, it is probably not working as expected and there is no practical use for it anyway. --- diff --git a/pdns/dnsdistdist/dnsdist-actions-definitions.yml b/pdns/dnsdistdist/dnsdist-actions-definitions.yml index b7fe49e7b2..dd6073fae2 100644 --- a/pdns/dnsdistdist/dnsdist-actions-definitions.yml +++ b/pdns/dnsdistdist/dnsdist-actions-definitions.yml @@ -79,7 +79,7 @@ - name: "vars" type: "ResponseConfig" default: true - description: "The response options" + description: "The response options (deprecated since 2.0.0, do not use)" - name: "KeyValueStoreLookup" description: "Does a lookup into the key value store using the key returned by ``lookup_key_name``, and storing the result if any into the tag named ``destination_tag``. The store can be a ``CDB`` or a ``LMDB`` database. The key can be based on the qname, source IP or the value of an existing tag. Subsequent rules are processed after this action. Note that the tag is always created, even if there was no match, but in that case the content is empty" skip-cpp: true diff --git a/pdns/dnsdistdist/docs/reference/actions.rst b/pdns/dnsdistdist/docs/reference/actions.rst index 6ad2bb6d49..8b5bdefc13 100644 --- a/pdns/dnsdistdist/docs/reference/actions.rst +++ b/pdns/dnsdistdist/docs/reference/actions.rst @@ -174,12 +174,15 @@ The following actions exist. .. versionchanged:: 1.5.0 Added the optional parameter ``options``. + .. versionchanged:: 2.0.0 + The ``options`` parameter is now deprecated. + Return an HTTP response with a status code of ''status''. For HTTP redirects, ''body'' should be the redirect URL. :param int status: The HTTP status code to return. :param string body: The body of the HTTP response, or a URL if the status code is a redirect (3xx). :param string contentType: The HTTP Content-Type header to return for a 200 response, ignored otherwise. Default is ''application/dns-message''. - :param table options: A table with key: value pairs with options. + :param table options: A table with key: value pairs with options. Deprecated since 2.0.0 as it had unexpected side-effects. Options: diff --git a/pdns/dnsdistdist/docs/reference/yaml-actions.rst b/pdns/dnsdistdist/docs/reference/yaml-actions.rst index c7349d9eab..8544483e51 100644 --- a/pdns/dnsdistdist/docs/reference/yaml-actions.rst +++ b/pdns/dnsdistdist/docs/reference/yaml-actions.rst @@ -117,7 +117,7 @@ Parameters: - **status**: Unsigned integer - The HTTP status code to return - **body**: String - The body of the HTTP response, or a URL if the status code is a redirect (3xx) - **content_type**: String ``("")`` - The HTTP Content-Type header to return for a 200 response, ignored otherwise. Default is ``application/dns-message`` -- **vars**: :ref:`ResponseConfig ` - The response options +- **vars**: :ref:`ResponseConfig ` - The response options (deprecated since 2.0.0, do not use) .. _yaml-settings-KeyValueStoreLookupAction: diff --git a/pdns/dnsdistdist/docs/upgrade_guide.rst b/pdns/dnsdistdist/docs/upgrade_guide.rst index 165eccffaf..b35182944c 100644 --- a/pdns/dnsdistdist/docs/upgrade_guide.rst +++ b/pdns/dnsdistdist/docs/upgrade_guide.rst @@ -15,6 +15,8 @@ XPF support has been removed. :meth:`Server:setAuto` used to reset the health-check mode to ``active`` even if it had previously been set to ``lazy`` via :meth:`Server:setLazyAuto`. This is no longer the case, and :meth:`Server:setActiveAuto` should be used instead to set the health-check mode to ``Active``. +The ``options`` parameter of :func:`HTTPStatusAction` has been deprecated because it had unexpected side-effects, and should thus no longer be used. + 1.8.x to 1.9.0 --------------