|
2 | 2 | <html lang="en"> |
3 | 3 | <head> |
4 | 4 | <meta charset="utf-8" /> |
5 | | - <title>HAProxy version 2.6.20-2 - Configuration Manual</title> |
| 5 | + <title>HAProxy version 2.6.20-37 - Configuration Manual</title> |
6 | 6 | <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" /> |
7 | 7 | <link href="https://raw.githubusercontent.com/thomaspark/bootswatch/v3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" /> |
8 | 8 | <link href="../css/page.css?0.4.2-15" rel="stylesheet" /> |
|
4145 | 4145 | You can use <strong>left</strong> and <strong>right</strong> arrow keys to navigate between chapters.<br> |
4146 | 4146 | </p> |
4147 | 4147 | <p class="text-right"> |
4148 | | - <small>Converted with <a href="https://github.com/cbonte/haproxy-dconv">haproxy-dconv</a> v<b>0.4.2-15</b> on <b>2024/11/08</b></small> |
| 4148 | + <small>Converted with <a href="https://github.com/cbonte/haproxy-dconv">haproxy-dconv</a> v<b>0.4.2-15</b> on <b>2025/01/09</b></small> |
4149 | 4149 | </p> |
4150 | 4150 | </div> |
4151 | 4151 | <!-- /.sidebar --> |
|
4156 | 4156 | <div class="text-center"> |
4157 | 4157 | <h1><a href="http://www.haproxy.org/" title="HAProxy"><img src="../img/HAProxyCommunityEdition_60px.png?0.4.2-15" /></a></h1> |
4158 | 4158 | <h2>Configuration Manual</h2> |
4159 | | - <p><strong>version 2.6.20-2</strong></p> |
| 4159 | + <p><strong>version 2.6.20-37</strong></p> |
4160 | 4160 | <p> |
4161 | 4161 | 2024/11/08<br> |
4162 | 4162 |
|
@@ -5997,6 +5997,54 @@ <h2 id="chapter-2.4" data-target="2.4"><small><a class="small" href="#2.4">2.4.< |
5997 | 5997 | - expressions combined with a logical OR ('||'), which will be evaluated |
5998 | 5998 | from right to left until one returns true |
5999 | 5999 |
|
| 6000 | +The same line tokenizer and argument parser are used as for the rest of the |
| 6001 | +configuration language. Words are split around consecutive series of one or |
| 6002 | +more unquoted spaces or tabs, and are reassembled together using a single space |
| 6003 | +to delimit them before evaluation, in order to save the user from having to |
| 6004 | +quote the entire line. But this also means that spaces surrounding commas or |
| 6005 | +parenthesis are definitely part of the value, which is not always expected. |
| 6006 | +For example, the expression below: |
| 6007 | + |
| 6008 | + .if defined( HAPROXY_MWORKER ) |
| 6009 | + |
| 6010 | +will test for the existence of variable " HAPROXY_MWORKER " (with spaces), |
| 6011 | +and this one: |
| 6012 | + |
| 6013 | + .if streq("$ENABLE_SSL", 1) |
| 6014 | + |
| 6015 | +will compare the environment variable "ENABLE_SSL" to the value " 1" (with a |
| 6016 | +single leading space). The reason is the line is first split into words like |
| 6017 | +this: |
| 6018 | + |
| 6019 | + .if streq("$ENABLE_SSL", 1) |
| 6020 | + |---|--------------------| |--| |
| 6021 | + 1 2 3 |
| 6022 | + |
| 6023 | +then the weak quoting is applied and environment variable "$ENABLE_SSL" is |
| 6024 | +resolved (let's say for example that ENABLE_SSL=0), and finally the words are |
| 6025 | +reassembled into a single string by placing a single space between the words: |
| 6026 | + |
| 6027 | + .if streq(0, 1) |
| 6028 | + |---|-------|--| |
| 6029 | + 1 2 3 |
| 6030 | + |
| 6031 | +and only then it is parsed as a single expression. The space that was inserted |
| 6032 | +between the comma and "1" is still part of the argument value, making this |
| 6033 | +argument " 1": |
| 6034 | + |
| 6035 | + .if streq(0, 1) |
| 6036 | + |---|-----|-|--| |
| 6037 | + \ \ \ \_ argument2: " 1" |
| 6038 | + \ \ \___ argument1: "0" |
| 6039 | + \ \_______ function: "streq" |
| 6040 | + \___________ directive: ".if" |
| 6041 | + |
| 6042 | +It's visible here that even if ENABLE_SSL had been equal to "1", it wouldn't |
| 6043 | +have matched " 1" since the string would differ by one space. |
| 6044 | + |
| 6045 | +Note: as explained in section "2.2. Quoting and escaping", a good rule of thumb |
| 6046 | + is to never insert unneeded spaces inside expressions. |
| 6047 | + |
6000 | 6048 | Note that like in other languages, the AND operator has precedence over the OR |
6001 | 6049 | operator, so that "A && B || C && D" evalues as "(A && B) || (C && D)". |
6002 | 6050 |
|
@@ -25204,9 +25252,10 @@ <h2 id="chapter-8.4" data-target="8.4"><small><a class="small" href="#8.4">8.4.< |
25204 | 25252 | instance during a POST request, the time already runs, and this can distort |
25205 | 25253 | apparent response time. For this reason, it's generally wise not to trust |
25206 | 25254 | too much this field for POST requests initiated from clients behind an |
25207 | | - untrusted network. A value of "-1" here means that the last the response |
25208 | | - header (empty line) was never seen, most likely because the server timeout |
25209 | | - stroke before the server managed to process the request. |
| 25255 | + untrusted network. A value of "-1" here means that the last response header |
| 25256 | + (empty line) was never seen, most likely because the server timeout stroke |
| 25257 | + before the server managed to process the request or because the server |
| 25258 | + returned an invalid response. |
25210 | 25259 |
|
25211 | 25260 | - Td: this is the total transfer time of the response payload till the last |
25212 | 25261 | byte sent to the client. In HTTP it starts after the last response header |
@@ -26455,7 +26504,7 @@ <h2 id="chapter-11.3" data-target="11.3"><small><a class="small" href="#11.3">11 |
26455 | 26504 | <br> |
26456 | 26505 | <hr> |
26457 | 26506 | <div class="text-right"> |
26458 | | - HAProxy 2.6.20-2 – Configuration Manual<br> |
| 26507 | + HAProxy 2.6.20-37 – Configuration Manual<br> |
26459 | 26508 | <small>, 2024/11/08</small> |
26460 | 26509 | </div> |
26461 | 26510 | </div> |
|
0 commit comments