mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
MEDIUM: lua: Don't filter exported fetches and converters
Thanks to previous commits, it is now safe to use from lua the sample fetches and sample converters that convert arguments, especially the strings (ARGT_STR). So now, there are all exported to the lua. They was filtered on the validation functions. Only fetches without validation functions or with val_hdr or val_payload_lv functions were exported, and converters without validation functions. This patch depends on following commits : * aec27ef44 "BUG/MINOR: lua: Duplicate lua strings in sample fetches/converters arg array" * fdea1b631 "MINOR: hlua: Don't needlessly copy lua strings in trash during args validation" It must be backported as far as 2.1 because the date() and http_date() converters are no longer exported because of the filter on the validation function, since the commit ae6f125c7 ("MINOR: sample: add us/ms support to date/http_date)".
This commit is contained in:
parent
aec27ef443
commit
05e2d77441
15
src/hlua.c
15
src/hlua.c
@ -8333,15 +8333,6 @@ void hlua_init(void)
|
||||
*/
|
||||
sf = NULL;
|
||||
while ((sf = sample_fetch_getnext(sf, &idx)) != NULL) {
|
||||
|
||||
/* Dont register the keywork if the arguments check function are
|
||||
* not safe during the runtime.
|
||||
*/
|
||||
if ((sf->val_args != NULL) &&
|
||||
(sf->val_args != val_payload_lv) &&
|
||||
(sf->val_args != val_hdr))
|
||||
continue;
|
||||
|
||||
/* gL.Tua doesn't support '.' and '-' in the function names, replace it
|
||||
* by an underscore.
|
||||
*/
|
||||
@ -8381,12 +8372,6 @@ void hlua_init(void)
|
||||
*/
|
||||
sc = NULL;
|
||||
while ((sc = sample_conv_getnext(sc, &idx)) != NULL) {
|
||||
/* Dont register the keywork if the arguments check function are
|
||||
* not safe during the runtime.
|
||||
*/
|
||||
if (sc->val_args != NULL)
|
||||
continue;
|
||||
|
||||
/* gL.Tua doesn't support '.' and '-' in the function names, replace it
|
||||
* by an underscore.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user