From: Remi Gacogne Date: Fri, 13 Mar 2020 15:38:24 +0000 (+0100) Subject: Fix Lua proxy protocol values syntax in the documentation X-Git-Tag: dnsdist-1.5.0-alpha1~12^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e0f14b4c26d8824cfbe1ac9153dfc6d54be94575;p=thirdparty%2Fpdns.git Fix Lua proxy protocol values syntax in the documentation --- diff --git a/pdns/dnsdistdist/docs/reference/dq.rst b/pdns/dnsdistdist/docs/reference/dq.rst index d758b942f5..b1b4163c9a 100644 --- a/pdns/dnsdistdist/docs/reference/dq.rst +++ b/pdns/dnsdistdist/docs/reference/dq.rst @@ -210,7 +210,7 @@ This state can be modified from the various hooks. Set the Proxy-Protocol Type-Length values to send to the backend along with this query. - :param table values: A table of types and values to send, for example: ``{ ["0"] = foo", ["42"] = "bar" }`` + :param table values: A table of types and values to send, for example: ``{ [0] = foo", [42] = "bar" }`` .. method:: DNSQuestion:setTag(key, value) diff --git a/pdns/dnsdistdist/docs/rules-actions.rst b/pdns/dnsdistdist/docs/rules-actions.rst index 4ff2fcb57d..f44ec55766 100644 --- a/pdns/dnsdistdist/docs/rules-actions.rst +++ b/pdns/dnsdistdist/docs/rules-actions.rst @@ -1257,7 +1257,7 @@ The following actions exist. Set the Proxy-Protocol Type-Length values to be sent to the server along with this query to ``values``. - :param table values: A table of types and values to send, for example: ``{ ["0"] = foo", ["42"] = "bar" }`` + :param table values: A table of types and values to send, for example: ``{ [0] = foo", [42] = "bar" }`` .. function:: SkipCacheAction() diff --git a/regression-tests.dnsdist/test_ProxyProtocol.py b/regression-tests.dnsdist/test_ProxyProtocol.py index 660346516d..ab6c1a208c 100644 --- a/regression-tests.dnsdist/test_ProxyProtocol.py +++ b/regression-tests.dnsdist/test_ProxyProtocol.py @@ -170,7 +170,7 @@ class TestProxyProtocol(ProxyProtocolTest): newServer{address="127.0.0.1:%d", useProxyProtocol=true} function addValues(dq) - local values = { ["0"]="foo", ["42"]="bar" } + local values = { [0]="foo", [42]="bar" } dq:setProxyProtocolValues(values) return DNSAction.None end