File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,4 +11,4 @@ defaults
1111 timeout server 60s
1212
1313frontend http
14- bind :80
14+ bind :80
Original file line number Diff line number Diff line change 66 server {{ .Address.IP }}:{{ .Address.Port }} {{ .Address.IP }}:{{ .Address.Port }} check
77 {{ else }}
88 # {{ .Container.Name }}
9- server {{ .Container.Name }}:{{ .Address.Port }} {{ .Container.Name }}:{{ .Address.Port }} check
9+ server {{ .Container.Name }}:{{ .Address.Port }} {{ .Container.Name }}:{{ .Address.Port }} check init-addr none
1010 {{ end }}
1111 {{ end }}
1212{{ end }}
Original file line number Diff line number Diff line change @@ -154,6 +154,21 @@ _require_docker_socket() {
154154 [[ " $output " =~ " class=px" ]]
155155}
156156
157+ @test " tune.bufsize allows request headers larger than the default 16 KB" {
158+ _require_docker_socket
159+ # Send a header value between the default tune.bufsize (16384) and the
160+ # configured value (32768). With the default bufsize HAProxy would drop the
161+ # connection (curl gets "000"); with the configured 32768 it fits and HAProxy
162+ # serves the stats page with a 200. Asserting exactly 200 catches both cases.
163+ local large_value
164+ large_value=" $( python3 -c ' print("A" * 30000)' ) "
165+ run curl -s -o /dev/null -w " %{http_code}" \
166+ -H " X-Large-Header: ${large_value} " \
167+ " http://localhost:${TEST_PORT} /stats"
168+ [ " $status " -eq 0 ]
169+ [ " $output " = " 200" ]
170+ }
171+
157172# ---------------------------------------------------------------------------
158173# Integration — backend containers appear in the generated haproxy config.
159174# These tests mirror the "mailhog test" / backend discovery steps in CI.
You can’t perform that action at this time.
0 commit comments