]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: hlua: fixing hlua_http_msg_insert_data behavior
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 28 Sep 2022 14:03:45 +0000 (16:03 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 28 Sep 2022 16:43:25 +0000 (18:43 +0200)
commit7fdba0ae544cb1b14b7d3864b06f38c752505094
tree81351df19e90549d1617b9156125b790d3ff8b9c
parentd7c71b03d83144913a33a09080c3738b27395af8
BUG/MINOR: hlua: fixing hlua_http_msg_insert_data behavior

hlua_http_msg_insert_data() function is called upon
HTTPMessage.insert() method from lua script.

This function did not work properly for multiple reasons:

  - An incorrect argument check was performed and prevented the user
  from providing optional offset argument.

  - Input and output variables were inverted
  and offset was not handled properly. The same bug
  was also fixed in hlua_http_msg_del_data(), see:
  'BUG/MINOR: hlua: fixing hlua_http_msg_del_data behavior'

The function now behaves as described in the documentation.

This could be backported to 2.6 and 2.5.
src/hlua.c