From 4a7b5b3fdb291eb54b5750f2328d06ef16935f5c Mon Sep 17 00:00:00 2001
From: Willy Tarreau <w@1wt.eu>
Date: Fri, 14 Dec 2018 09:51:48 +0100
Subject: [PATCH] REGTEST: http-messaging: add "option http-buffer-request" for
 H2 tests

These tests upload contents and randomly make the server start to
respond before the client finishes to upload data, making the test
occasionally fail. Waiting for a body in the server doesn't always
work, depending on the method or how the data are advertised. Thus,
let's ask haproxy to wait for the request using the aforementioned
option, it guarantees that the DATA frame is sent before the response
HEADERS frame is delivered.
---
 reg-tests/http-messaging/h00002.vtc | 1 +
 reg-tests/http-messaging/h00003.vtc | 1 +
 2 files changed, 2 insertions(+)

diff --git a/reg-tests/http-messaging/h00002.vtc b/reg-tests/http-messaging/h00002.vtc
index 0b2daee30..6fc536aed 100644
--- a/reg-tests/http-messaging/h00002.vtc
+++ b/reg-tests/http-messaging/h00002.vtc
@@ -40,6 +40,7 @@ haproxy h1 -conf {
     defaults
 	#log stdout format raw daemon
 	mode http
+	option http-buffer-request
 	#option http-use-htx
 	timeout connect 1s
 	timeout client  1s
diff --git a/reg-tests/http-messaging/h00003.vtc b/reg-tests/http-messaging/h00003.vtc
index acb56b009..ec117563b 100644
--- a/reg-tests/http-messaging/h00003.vtc
+++ b/reg-tests/http-messaging/h00003.vtc
@@ -40,6 +40,7 @@ haproxy h1 -conf {
     defaults
 	#log stdout format raw daemon
 	mode http
+	option http-buffer-request
 	option http-use-htx
 	timeout connect 1s
 	timeout client  1s