# checked in the log because the response may be lost when the proxy
# closes the connection with the request not fully drained.
#
+# The request is larger than the buffer, so it is received in at least
+# two reads. Depending on the timing, the error is reported either by
+# the H1 mux, before the stream creation ("<BADREQ>" logged), or by the
+# stream, after the headers analysis (request line logged). The body is
+# waited for with "option http-buffer-request" so that the request is
+# never forwarded to the server before the error. In both cases, a 400
+# with PR-- termination flags is logged.
+#
# The second client sends a valid request to check that the proxy
# remains alive and behaves normally.
syslog S -level info {
recv
- expect ~ ".* li1 li1/<NOSRV> -1/-1/-1/-1/[0-9]* 400 .* PR-- .* \"<BADREQ>\""
+ expect ~ ".* li1 li1/<NOSRV> -1/-1/-1/-1/[0-9]* 400 .* PR-- .* \"(<BADREQ>|POST /big HTTP/1.1)\""
} -start
haproxy h1 -conf {
listen li1
bind "fd@${li1}"
option httplog
+ option http-buffer-request
option dontlog-normal
log "${S_addr}:${S_port}" local0 info
server s1 "${h1_li2_addr}:${h1_li2_port}"