------------------------------------------------------------------------
*From:* Willy Tarreau [mailto:w...@1wt.eu]
*Sent:* Tuesday, June 4, 2019, 10:08 EDT
*To:* Patrick Hemmer <hapr...@stormcloud9.net>
*Cc:* haproxy@formilux.org
*Subject:* http_first_req not working with http2

Hi Patrick,

On Mon, Jun 03, 2019 at 05:21:26PM -0400, Patrick Hemmer wrote:
As subject says, it appears that the http_first_req sample is not working
with http2.
Indeed, the first request in H1 is special in that it is not
automatically retryable. In H2 it's different, all requests are
totally independant and there is not even any real ordering. Since
it is possible to use GOAWAY to cleanly close a connection, no H2
request suffers from the limitations of the first H1 request, so
none of them is marked first. At the very least this should be
mentioned in the doc.

Do you have a particular use case that relies on this and which would
need any form of emulation of this older behaviour ? I couldn't find
any but maybe there are.

Thanks,
Willy

The use case was that I was trying to log SSL data (via a Lua script) when the connection is first established. If the frontend is operating in http mode (as opposed to tcp), we can only apply actions on receipt of a request, and not after connection is established. Thus I was trying to use http_first_req to trigger the action only on the first request.

I suppose an alternate that might work would be to add support for using Lua actions with `tcp-request session`.

-Patrick

Reply via email to