If I set a variable like this:

/http-request set-var(txn.allowed_methods) str("GET,POST,PUT")/


Then I get an error:


/parsing [/etc/haproxy/haproxy.cfg:20] : error detected in frontend 'fe_proxy' while parsing 'http-request set-var(txn.allowed_methods)' rule : fetch method 'str' : end of arguments expected at position 2, but got ',POST,PUT,OPTIONS'./


This seems like HAProxy is parsing the comma as a delimiter between arguments to the str() fetch method instead of including it as part of the string that's surrounded by double quotes. Is this expected behavior? If so, is there a work-around? Some way to escape commas in a string passed to str()?


Nick Ramirez

Reply via email to