BUG/MEDIUM: mux-h1: Remove "Upgrade:" header for requests with payload
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 9 Sep 2021 07:52:51 +0000 (09:52 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 10 Sep 2021 07:17:51 +0000 (09:17 +0200)
commit52a5ec2d18d610efcfd54da1856d1a4e6099d866
tree7e97421e6f3c927471fa10196b295cae96a952db
parentf14edc82124e34ac88e08239f3c6ddd09da1cddd
BUG/MEDIUM: mux-h1: Remove "Upgrade:" header for requests with payload

Instead of returning a 501-Not-implemented error when "Ugrade:" header is
found for a request with a payload, the header is removed. This way, the
upgrade is disabled and the request is still sent to the server. It is
required because some frameworks seem to try to perform H2 upgrade on every
requests, including POST ones.

The h2 mux was slightly fixed to convert Upgrade requests to extended
connect ones only if the rigth HTX flag is set.

This patch should fix the issue #1381. It must be backported to 2.4.
src/h1_htx.c
src/mux_h2.c