]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
DOC: Fix "errorfile" description in the configuration manual
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 18 May 2020 15:42:48 +0000 (17:42 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 20 May 2020 16:27:14 +0000 (18:27 +0200)
"errorfile" description is outdated. Now, error messages are parsed at startup
and converted to HTX messages. So they must be valid according to the HTTP
standards. In addition, there is now a comment about the reserved buffer space
that should remain available to allow header rewrites.

doc/configuration.txt

index 9eaec2ab7dbf5891ee5251c670c99b2db7a859d4..011aca4faf3b2784aa4adac4393a1703e2fac3a7 100644 (file)
@@ -3793,17 +3793,15 @@ errorfile <code> <file>
 
   Code 200 is emitted in response to requests matching a "monitor-uri" rule.
 
-  The files are returned verbatim on the TCP socket. This allows any trick such
-  as redirections to another URL or site, as well as tricks to clean cookies,
-  force enable or disable caching, etc... The package provides default error
-  files returning the same contents as default errors.
-
-  The files should not exceed the configured buffer size (BUFSIZE), which
-  generally is 8 or 16 kB, otherwise they will be truncated. It is also wise
-  not to put any reference to local contents (e.g. images) in order to avoid
-  loops between the client and HAProxy when all servers are down, causing an
-  error to be returned instead of an image. For better HTTP compliance, it is
-  recommended that all header lines end with CR-LF and not LF alone.
+  The files are parsed when HAProxy starts and must be valid according to the
+  HTTP specification. They should not exceed the configured buffer size
+  (BUFSIZE), which generally is 16 kB, otherwise an internal error will be
+  returned. It is also wise not to put any reference to local contents
+  (e.g. images) in order to avoid loops between the client and HAProxy when all
+  servers are down, causing an error to be returned instead of an
+  image. Finally, The response cannot exceed (tune.bufsize - tune.maxrewrite)
+  so that "http-after-response" rules still have room to operate (see
+  "tune.maxrewrite").
 
   The files are read at the same time as the configuration and kept in memory.
   For this reason, the errors continue to be returned even when the process is