BUG/MINOR: mux-h2: use timeout http-request as a fallback for http-keep-alive

The doc states that timeout http-keep-alive is not set, timeout http-request
is used instead. As implemented in commit  15a4733d5 ("BUG/MEDIUM: mux-h2:
make use of http-request and keep-alive timeouts"), we use http-keep-alive
unconditionally between requests, with a fallback on client/server. Let's
make sure http-request is always used as a fallback for http-keep-alive
first.

This needs to be backported wherever the commit above is backported.

Thanks to Christian Ruppert for spotting this.

(cherry picked from commit 86b08a3e3eb62d6642604846db3e40db37b91b16)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit a88b9560cccc71bccebf767fb08619821b51cbb4)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
diff --git a/src/mux_h2.c b/src/mux_h2.c
index c7b2799..7a0d6cb 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -719,7 +719,14 @@
 			h2c->task->expire = tick_add_ifset(now_ms, h2c->timeout);
 		} else if (!(h2c->flags & H2_CF_IS_BACK) && h2c->max_id > 0 && !b_data(&h2c->dbuf)) {
 			/* idle after having seen one stream => keep-alive */
-			h2c->task->expire = tick_add_ifset(h2c->idle_start, h2c->proxy->timeout.httpka);
+			int to;
+
+			if (tick_isset(h2c->proxy->timeout.httpka))
+				to = h2c->proxy->timeout.httpka;
+			else
+				to = h2c->proxy->timeout.httpreq;
+
+			h2c->task->expire = tick_add_ifset(h2c->idle_start, to);
 		} else {
 			/* before first request, or started to deserialize a
 			 * new req => http-request, but only set, not refresh.