Skip to content

Commit a156345

Browse files
author
HAProxy Community
committed
Update docs for 2.8
1 parent a99893d commit a156345

File tree

3 files changed

+91
-41
lines changed

3 files changed

+91
-41
lines changed

docs/2.8/configuration.html

Lines changed: 83 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<title>HAProxy version 2.8.12-12 - Configuration Manual</title>
5+
<title>HAProxy version 2.8.12-34 - Configuration Manual</title>
66
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
77
<link href="https://raw.githubusercontent.com/thomaspark/bootswatch/v3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" />
88
<link href="../css/page.css?0.4.2-15" rel="stylesheet" />
@@ -4294,7 +4294,7 @@
42944294
You can use <strong>left</strong> and <strong>right</strong> arrow keys to navigate between chapters.<br>
42954295
</p>
42964296
<p class="text-right">
4297-
<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>
4297+
<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/22</b></small>
42984298
</p>
42994299
</div>
43004300
<!-- /.sidebar -->
@@ -4305,7 +4305,7 @@
43054305
<div class="text-center">
43064306
<h1><a href="http://www.haproxy.org/" title="HAProxy"><img src="../img/HAProxyCommunityEdition_60px.png?0.4.2-15" /></a></h1>
43074307
<h2>Configuration Manual</h2>
4308-
<p><strong>version 2.8.12-12</strong></p>
4308+
<p><strong>version 2.8.12-34</strong></p>
43094309
<p>
43104310
2024/11/08<br>
43114311

@@ -6177,6 +6177,54 @@ <h2 id="chapter-2.4" data-target="2.4"><small><a class="small" href="#2.4">2.4.<
61776177
- expressions combined with a logical OR ('||'), which will be evaluated
61786178
from right to left until one returns true
61796179

6180+
The same line tokenizer and argument parser are used as for the rest of the
6181+
configuration language. Words are split around consecutive series of one or
6182+
more unquoted spaces or tabs, and are reassembled together using a single space
6183+
to delimit them before evaluation, in order to save the user from having to
6184+
quote the entire line. But this also means that spaces surrounding commas or
6185+
parenthesis are definitely part of the value, which is not always expected.
6186+
For example, the expression below:
6187+
6188+
.if defined( HAPROXY_MWORKER )
6189+
6190+
will test for the existence of variable &quot; HAPROXY_MWORKER &quot; (with spaces),
6191+
and this one:
6192+
6193+
.if streq(&quot;$ENABLE_SSL&quot;, 1)
6194+
6195+
will compare the environment variable &quot;ENABLE_SSL&quot; to the value &quot; 1&quot; (with a
6196+
single leading space). The reason is the line is first split into words like
6197+
this:
6198+
6199+
.if streq(&quot;$ENABLE_SSL&quot;, 1)
6200+
|---|--------------------| |--|
6201+
1 2 3
6202+
6203+
then the weak quoting is applied and environment variable &quot;$ENABLE_SSL&quot; is
6204+
resolved (let's say for example that ENABLE_SSL=0), and finally the words are
6205+
reassembled into a single string by placing a single space between the words:
6206+
6207+
.if streq(0, 1)
6208+
|---|-------|--|
6209+
1 2 3
6210+
6211+
and only then it is parsed as a single expression. The space that was inserted
6212+
between the comma and &quot;1&quot; is still part of the argument value, making this
6213+
argument &quot; 1&quot;:
6214+
6215+
.if streq(0, 1)
6216+
|---|-----|-|--|
6217+
\ \ \ \_ argument2: &quot; 1&quot;
6218+
\ \ \___ argument1: &quot;0&quot;
6219+
\ \_______ function: &quot;streq&quot;
6220+
\___________ directive: &quot;.if&quot;
6221+
6222+
It's visible here that even if ENABLE_SSL had been equal to &quot;1&quot;, it wouldn't
6223+
have matched &quot; 1&quot; since the string would differ by one space.
6224+
6225+
Note: as explained in section &quot;2.2. Quoting and escaping&quot;, a good rule of thumb
6226+
is to never insert unneeded spaces inside expressions.
6227+
61806228
Note that like in other languages, the AND operator has precedence over the OR
61816229
operator, so that &quot;A &amp;&amp; B || C &amp;&amp; D&quot; evalues as &quot;(A &amp;&amp; B) || (C &amp;&amp; D)&quot;.
61826230

@@ -6191,7 +6239,8 @@ <h2 id="chapter-2.4" data-target="2.4"><small><a class="small" href="#2.4">2.4.<
61916239

61926240
- streq(&lt;str1&gt;,&lt;str2&gt;) : returns true only if the two strings are equal
61936241
- strneq(&lt;str1&gt;,&lt;str2&gt;) : returns true only if the two strings differ
6194-
- strstr(&lt;str1&gt;,&lt;str2&gt;) : returns true only if the second string is found in the first one
6242+
- strstr(&lt;str1&gt;,&lt;str2&gt;) : returns true only if the second string is found in
6243+
the first one.
61956244

61966245
- version_atleast(&lt;ver&gt;): returns true if the current haproxy version is
61976246
at least as recent as &lt;ver&gt; otherwise false. The
@@ -23307,7 +23356,30 @@ <h3 id="chapter-7.3.2" data-target="7.3.2"><small><a class="small" href="#7.3.2"
2330723356
&quot;res&quot; : the variable is shared only during response processing.
2330823357
This prefix is followed by a name. The separator is a '.'. The name may only
2330923358
contain characters 'a-z', 'A-Z', '0-9', '.' and '_'.
23310-
</pre></div>
23359+
</pre><a class="anchor" name="wait_end"></a><a class="anchor" name="7-wait_end"></a><a class="anchor" name="7.3.2-wait_end"></a><a class="anchor" name="wait_end (Using ACLs and fetching samples)"></a><a class="anchor" name="wait_end (Fetching samples from internal states)"></a><div class="keyword"><b><a class="anchor" name="wait_end"></a><a href="#7.3.2-wait_end">wait_end</a></b> : boolean</div><pre class="text">This fetch either returns true when the inspection period is over, or does
23360+
not fetch. It is only used in ACLs, in conjunction with content analysis to
23361+
avoid returning a wrong verdict early. It may also be used to delay some
23362+
actions, such as a delayed reject for some special addresses. Since it either
23363+
stops the rules evaluation or immediately returns true, it is recommended to
23364+
use this acl as the last one in a rule. Please note that the default ACL
23365+
&quot;WAIT_END&quot; is always usable without prior declaration. This test was designed
23366+
to be used with TCP request content inspection.
23367+
</pre><div class="separator">
23368+
<span class="label label-success">Examples :</span>
23369+
<pre class="prettyprint">
23370+
<code><span class="comment"># delay every incoming request by 2 seconds</span>
23371+
tcp-request inspect-delay 2s
23372+
tcp-request content accept if WAIT_END
23373+
23374+
<span class="comment"># don't immediately tell bad guys they are rejected</span>
23375+
tcp-request inspect-delay 10s
23376+
acl goodguys src 10.0.0.0/24
23377+
acl badguys src 10.0.1.0/24
23378+
tcp-request content accept if goodguys
23379+
tcp-request content reject if badguys WAIT_END
23380+
tcp-request content reject
23381+
</code></pre>
23382+
</div></div>
2331123383
<a class="anchor" id="7.3.3" name="7.3.3"></a>
2331223384
<h3 id="chapter-7.3.3" data-target="7.3.3"><small><a class="small" href="#7.3.3">7.3.3.</a></small> Fetching samples at Layer 4</h3>
2331323385
<div><pre class="text">The layer 4 usually describes just the transport layer which in HAProxy is
@@ -24781,30 +24853,7 @@ <h3 id="chapter-7.3.5" data-target="7.3.5"><small><a class="small" href="#7.3.5"
2478124853
SSL data layer, so this will not work with &quot;<span class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">server<span class="caret"></span></a><ul class="dropdown-menu"><li class="dropdown-header">This keyword is available in sections :</li><li><a href="#server%20%28Peers%29">Peers</a></li><li><a href="#server%20%28Rings%29">Rings</a></li><li><a href="#server%20%28Alphabetically%20sorted%20keywords%20reference%29">Alphabetically sorted keywords reference</a></li></ul></span>&quot; lines having the &quot;<span class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">ssl<span class="caret"></span></a><ul class="dropdown-menu"><li class="dropdown-header">This keyword is available in sections :</li><li><a href="#ssl%20%28Bind%20options%29">Bind options</a></li><li><a href="#ssl%20%28Server%20and%20default-server%20options%29">Server and default-server options</a></li></ul></span>&quot;
2478224854
option. This is mostly used in ACL to detect presence of an SSL hello message
2478324855
that is supposed to contain an SSL session ID usable for stickiness.
24784-
</pre><a class="anchor" name="wait_end"></a><a class="anchor" name="7-wait_end"></a><a class="anchor" name="7.3.5-wait_end"></a><a class="anchor" name="wait_end (Using ACLs and fetching samples)"></a><a class="anchor" name="wait_end (Fetching samples from buffer contents (Layer 6))"></a><div class="keyword"><b><a class="anchor" name="wait_end"></a><a href="#7.3.5-wait_end">wait_end</a></b> : boolean</div><pre class="text">This fetch either returns true when the inspection period is over, or does
24785-
not fetch. It is only used in ACLs, in conjunction with content analysis to
24786-
avoid returning a wrong verdict early. It may also be used to delay some
24787-
actions, such as a delayed reject for some special addresses. Since it either
24788-
stops the rules evaluation or immediately returns true, it is recommended to
24789-
use this acl as the last one in a rule. Please note that the default ACL
24790-
&quot;WAIT_END&quot; is always usable without prior declaration. This test was designed
24791-
to be used with TCP request content inspection.
24792-
</pre><div class="separator">
24793-
<span class="label label-success">Examples :</span>
24794-
<pre class="prettyprint">
24795-
<code><span class="comment"># delay every incoming request by 2 seconds</span>
24796-
tcp-request inspect-delay 2s
24797-
tcp-request content accept if WAIT_END
24798-
24799-
<span class="comment"># don't immediately tell bad guys they are rejected</span>
24800-
tcp-request inspect-delay 10s
24801-
acl goodguys src 10.0.0.0/24
24802-
acl badguys src 10.0.1.0/24
24803-
tcp-request content accept if goodguys
24804-
tcp-request content reject if badguys WAIT_END
24805-
tcp-request content reject
24806-
</code></pre>
24807-
</div></div>
24856+
</pre></div>
2480824857
<a class="anchor" id="7.3.6" name="7.3.6"></a>
2480924858
<h3 id="chapter-7.3.6" data-target="7.3.6"><small><a class="small" href="#7.3.6">7.3.6.</a></small> Fetching HTTP samples (Layer 7)</h3>
2481024859
<div><pre class="text">It is possible to fetch samples from HTTP contents, requests and responses.
@@ -26450,9 +26499,10 @@ <h2 id="chapter-8.4" data-target="8.4"><small><a class="small" href="#8.4">8.4.<
2645026499
instance during a POST request, the time already runs, and this can distort
2645126500
apparent response time. For this reason, it's generally wise not to trust
2645226501
too much this field for POST requests initiated from clients behind an
26453-
untrusted network. A value of &quot;-1&quot; here means that the last the response
26454-
header (empty line) was never seen, most likely because the server timeout
26455-
stroke before the server managed to process the request.
26502+
untrusted network. A value of &quot;-1&quot; here means that the last response header
26503+
(empty line) was never seen, most likely because the server timeout stroke
26504+
before the server managed to process the request or because the server
26505+
returned an invalid response.
2645626506

2645726507
- Td: this is the total transfer time of the response payload till the last
2645826508
byte sent to the client. In HTTP it starts after the last response header
@@ -27824,7 +27874,7 @@ <h2 id="chapter-11.3" data-target="11.3"><small><a class="small" href="#11.3">11
2782427874
<br>
2782527875
<hr>
2782627876
<div class="text-right">
27827-
HAProxy 2.8.12-12 &ndash; Configuration Manual<br>
27877+
HAProxy 2.8.12-34 &ndash; Configuration Manual<br>
2782827878
<small>, 2024/11/08</small>
2782927879
</div>
2783027880
</div>

docs/2.8/intro.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<title>HAProxy version 2.8.12-12 - Starter Guide</title>
5+
<title>HAProxy version 2.8.12-34 - Starter Guide</title>
66
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
77
<link href="https://raw.githubusercontent.com/thomaspark/bootswatch/v3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" />
88
<link href="../css/page.css?0.4.2-15" rel="stylesheet" />
@@ -484,7 +484,7 @@
484484
You can use <strong>left</strong> and <strong>right</strong> arrow keys to navigate between chapters.<br>
485485
</p>
486486
<p class="text-right">
487-
<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>
487+
<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/22</b></small>
488488
</p>
489489
</div>
490490
<!-- /.sidebar -->
@@ -495,7 +495,7 @@
495495
<div class="text-center">
496496
<h1><a href="http://www.haproxy.org/" title="HAProxy"><img src="../img/HAProxyCommunityEdition_60px.png?0.4.2-15" /></a></h1>
497497
<h2>Starter Guide</h2>
498-
<p><strong>version 2.8.12-12</strong></p>
498+
<p><strong>version 2.8.12-34</strong></p>
499499
<p>
500500
<br>
501501

@@ -2515,7 +2515,7 @@ <h2 id="chapter-4.4" data-target="4.4"><small><a class="small" href="#4.4">4.4.<
25152515
<br>
25162516
<hr>
25172517
<div class="text-right">
2518-
HAProxy 2.8.12-12 &ndash; Starter Guide<br>
2518+
HAProxy 2.8.12-34 &ndash; Starter Guide<br>
25192519
<small>, </small>
25202520
</div>
25212521
</div>

docs/2.8/management.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<title>HAProxy version 2.8.12-12 - Management Guide</title>
5+
<title>HAProxy version 2.8.12-34 - Management Guide</title>
66
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
77
<link href="https://raw.githubusercontent.com/thomaspark/bootswatch/v3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" />
88
<link href="../css/page.css?0.4.2-15" rel="stylesheet" />
@@ -610,7 +610,7 @@
610610
You can use <strong>left</strong> and <strong>right</strong> arrow keys to navigate between chapters.<br>
611611
</p>
612612
<p class="text-right">
613-
<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>
613+
<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/22</b></small>
614614
</p>
615615
</div>
616616
<!-- /.sidebar -->
@@ -621,7 +621,7 @@
621621
<div class="text-center">
622622
<h1><a href="http://www.haproxy.org/" title="HAProxy"><img src="../img/HAProxyCommunityEdition_60px.png?0.4.2-15" /></a></h1>
623623
<h2>Management Guide</h2>
624-
<p><strong>version 2.8.12-12</strong></p>
624+
<p><strong>version 2.8.12-34</strong></p>
625625
<p>
626626
<br>
627627

@@ -4971,7 +4971,7 @@ <h3 id="chapter-9.4.1" data-target="9.4.1"><small><a class="small" href="#9.4.1"
49714971
<br>
49724972
<hr>
49734973
<div class="text-right">
4974-
HAProxy 2.8.12-12 &ndash; Management Guide<br>
4974+
HAProxy 2.8.12-34 &ndash; Management Guide<br>
49754975
<small>, </small>
49764976
</div>
49774977
</div>

0 commit comments

Comments
 (0)