Hi, On Tue, Mar 26, Christopher Faulet wrote: > Le 26/03/2019 à 08:48, Jarno Huuskonen a écrit : > >Testing with 2.0-dev2(2.0-dev2 2019/03/26) I get kind of strange results > >with http2: > >- curl seems to retry in a infinite loop > >- firefox tries few times with both H2 / HTTP1.1 and then shows > > "Secure Connection Failed" > >- chrome tries few times (3 times w/H2 and 3 times w/HTTP/1.1) and > > then shows "ERR_SPDY_SERVER_REFUSED_STREAM" > > > >(With HTTP/1.1 all three show 502 error page). > > > > Hi Jarno, > > The 502 response code in HTTP/1.1 is detected by curl as a transient > error (timeout, 408/5xx response code). If you add the option > '--retry 1', curl will retry to perform the request one time. My > Firefox seems to retry 1 time before giving up. Note that in > HTTP/1.1, such retries are only possible on idempotent request. > > In HTTP/2, because nothing was sent to the client, HAProxy closes > the stream sending a RST_STREAM frame with the error code > REFUSED_STREAM. It is a guarantee that a request has not been > processed. So the client may automatically retry it (see RFC7540 - # > 8.1.4) . My Firefox retries 9 times before giving up. But curl > retries in loop. The option "--retry" is ignored. So I guess it is a > bug from curl. > > So everything seems to work as expected from the HAproxy point of view.
Thank you for the explanation, makes sense. (And also thank you for working on this:) -Jarno -- Jarno Huuskonen