TestProxyProtocolV2WithH2C verifies that PROXY protocol v2 headers are sent correctly when the transport uses h2c (HTTP/2 cleartext) to the upstream. This is the primary regression test for github.com/caddyserver/caddy/issues/7529: before the fix, the h2 transport opened a new TCP connection per req
(t *testing.T)
| 402 | // (because req.URL.Host was mangled differently for each request due to the |
| 403 | // varying client port), which caused file-descriptor exhaustion under load. |
| 404 | func TestProxyProtocolV2WithH2C(t *testing.T) { |
| 405 | testProxyProtocolMatrix(t, "v2", []string{"h2c"}, 1) |
| 406 | } |
| 407 | |
| 408 | // TestProxyProtocolV2WithH2CMultipleRequests sends several sequential requests |
| 409 | // through the h2c + PROXY-protocol path and confirms that: |
nothing calls this directly
no test coverage detected