On Fri, Aug 21, 2020 at 9:14 PM William Dauchy <[email protected]> wrote:
> On Fri, Aug 21, 2020 at 7:46 PM Pierre Cheynier <[email protected]> wrote:
> > We're running HAProxy 2.2.2.
> > It turns out logging requests paths using "%HP" var produce a different 
> > results on H1 vs. H2.
> >
> > H1: /path
> > H2: https://hostname.domain/path (< I consider this one buggy)


I've also hit this issue in May
(https://www.mail-archive.com/[email protected]/msg37170.html), and
as many continue to upgrade to newer HAProxy versions, they might hit
that as well.  Personally I've opted into using variables set from
request / response rules, and then logging those in a custom log
format.

However the major issue, if I remember correctly, isn't that the
format has changed between HAProxy 2.0 and 2.1, but that in 2.1 the
same `%HP` produces different outputs based on the used protocol,
which will complicate log handling...

Perhaps a backward incompatible fix would be to always include the
protocol and `Host` header (or the IP if one is missing) in case of
HTTP/1.0 and HTTP/1.1, and thus have `%HP` always contain an URL.


> I believe this is expected; this behaviour has changed since v2.1 though.

It might be so, but the changelog for 2.1 says nothing about this change.

Ciprian.

Reply via email to