Hi Vladimir, On Sun, Oct 15, 2023 at 06:00:01AM +0300, Vladimir Vdovin wrote: > Added set-timeout action for http-response. Adapted reg-tests and > documentation.
Thanks for this. At first glance it looks good. I'm just seeing one small nit in the doc: > +http-response set-timeout { client | server | tunnel } { <timeout> | <expr> } > + [ { if | unless } <condition> ] > + > + This action overrides the specified "client", "server" or "tunnel" timeout > for the > + current stream only. The timeout can be specified in millisecond or with > any > + other unit if the number is suffixed by the unit as explained at the top of > + this document. It is also possible to write an expression which must > returns > + a number interpreted as a timeout in millisecond. > + > + Note that the server/tunnel timeouts are only relevant on the backend side > + and thus this rule is only available for the proxies with backend > + capabilities. As well as client timeout is only relevant for frontend side. > + Also the timeout value must be non-null to obtain the expected results. > + > + Example: > + http-response set-timeout tunnel 5s > + http-response set-timeout server req.hdr(host),map_int(host.lst) This last one will not work due to using req.hdr() which is only on the request path and not the response. Let's use something else, for example a header set by the server to indicate how many seconds to wait (as an example, any better idea is welcome): http-response set-timeout server res.hdr(X-Refresh-Seconds),mul(1000) Thanks! Willy