DOC: config: fix rfc7239 converter examples

Some rfc7239 converter examples were not working and thus were misleading.
Fixing rfc7239_n2nn and rfc7239_n2np usage examples.

As both converters were introduced in 2.8, no backport needed.
This commit is contained in:
Aurelien DARRAGON 2023-05-30 09:47:53 +02:00 committed by Christopher Faulet
parent 8fc7073906
commit ac456abc37

View File

@ -17751,10 +17751,12 @@ rfc7239_n2nn
# extract 'for' field from forwarded header, extract nodename from
# resulting node identifier and store the result in req.fnn
http-request set-var(req.fnn) req.hdr(forwarded),rfc7239_field(for),rfc7239_n2nn
#input: "for=\"127.0.0.1:9999\""
# output: 127.0.0.1
#input: "for=\"_name:_port\""
# output: "_name"
#input: "127.0.0.1:9999"
# output: 127.0.0.1 (ipv4)
#input: "[ab:cd:ff:ff:ff:ff:ff:ff]:9998"
# output: ab:cd:ff:ff:ff:ff:ff:ff (ipv6)
#input: "_name:_port"
# output: "_name" (string)
rfc7239_n2np
Converts RFC7239 node (provided by 'for' or 'by' 7239 header fields)
@ -17767,9 +17769,11 @@ rfc7239_n2np
# resulting node identifier and store the result in req.fnp
http-request set-var(req.fnp) req.hdr(forwarded),rfc7239_field(by),rfc7239_n2np
#input: "by=\"127.0.0.1:9999\""
# output: 9999
#input: "by=\"_name:_port\""
# output: "_port"
# output: 9999 (integer)
#input: "[ab:cd:ff:ff:ff:ff:ff:ff]:9998"
# output: 9998 (integer)
#input: "_name:_port"
# output: "_port" (string)
add(<value>)
Adds <value> to the input value of type signed integer, and returns the