]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: mux-h2/traces: clarify the "rejected H2 request" event
authorWilly Tarreau <w@1wt.eu>
Fri, 20 Oct 2023 15:47:33 +0000 (17:47 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 20 Oct 2023 19:09:12 +0000 (21:09 +0200)
commit08f3bb5bd567fda7f326723eb0c7f94a930f638a
tree968869621ca87ab3ea1141eed0ae459b3bdcbb92
parent1deac6f99a400eb32917f456c179579509293f88
MINOR: mux-h2/traces: clarify the "rejected H2 request" event

In h2_frt_handle_headers() all failures lead to a generic message saying
"rejected H2 request". It's quite inexpressive while there are a few
distinct tests that are made before jumping there:

  - trailers on closed stream
  - unparsable request
  - refused stream

Let's emit the traces from these call points instead so that we get more
info about what happened. Since these are user-level messages, we take
care of keeping them aligned as much as possible.

For example before it would say:

  [04|h2|1|mux_h2.c:2859] rejected H2 request : h2c=0x7f5d58036fd0(F,FRE)
  [04|h2|5|mux_h2.c:2860] h2c_frt_handle_headers(): leaving on error : h2c=0x7f5d58036fd0(F,FRE) dsi=1 h2s=0x9fdb60(0,CLO)

And now it says:

  [04|h2|1|mux_h2.c:2817] rcvd unparsable H2 request : h2c=0x7f55f8037160(F,FRH) dsi=1 h2s=CLO
  [04|h2|5|mux_h2.c:2875] h2c_frt_handle_headers(): leaving on error : h2c=0x7f55f8037160(F,FRE) dsi=1 h2s=CLO
src/mux_h2.c