From d5ac6de74aa4d0bbf06cbb0b4e1bbeee09d02038 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 2 Dec 2020 08:40:14 +0100 Subject: [PATCH] DOC: config: Add notes about errors emitted by H1 mux Now, some errors are handled by the H1 multiplexer. During the headers parsing request, there is no stream attached to the H1 mux. Thus, if an error is reported at this stage, it is handled by the mux itself. If possible the corresponding frontend errorfile is used, but it should be a static message. Custom error messages are not supported. Otherwise, default error messages are used. In addition, the http analysis has not started yet, so http-after-response ruleset is not evaluated and cannot alter these early responses. --- doc/configuration.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/configuration.txt b/doc/configuration.txt index 9ca24361c..81a90daf9 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -4927,6 +4927,10 @@ http-after-response [ { if | unless } ] There is no limit to the number of http-after-response statements per instance. + Note: Errors emitted in early stage of the request parsing are handled by the + multiplexer at a lower level, before any http analysis. Thus no + http-after-response ruleset is evaluated on these errors. + Example: http-after-response set-header Strict-Transport-Security "max-age=31536000" http-after-response set-header Cache-Control "no-store,no-cache,private" @@ -5592,6 +5596,12 @@ http-error status [content-type ] For this reason, the errors continue to be returned even when the process is chrooted, and no file change is considered while the process is running. + Note: 400/408/500 errors emitted in early stage of the request parsing are + handled by the multiplexer at a lower level. No custom formatting is + supported at this level. Thus only static error messages, defined with + "errorfile" directive, are supported. However, this limitation only + exists during the request headers parsing or between two transactions. + See also : "errorfile", "errorfiles", "errorloc", "errorloc302", "errorloc303" and section 3.8 about http-errors.