]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: session: don't clear CF_READ_NOEXP if analysers are not called
authorWilly Tarreau <w@1wt.eu>
Wed, 21 May 2014 14:58:17 +0000 (16:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 21 May 2014 14:58:17 +0000 (16:58 +0200)
commit0943757a2144761c60e416b5ed07baa76934f5a4
treec4d42b7dee0f0cc72310f056b302f02fd4cb248f
parent041751c13a88ade79d45412db1c6bde6c0f2f901
BUG/MEDIUM: session: don't clear CF_READ_NOEXP if analysers are not called

As more or less suspected, commit b1982e2 ("BUG/MEDIUM: http/session:
disable client-side expiration only after body") was hazardous. It
introduced a regression causing client side timeout to expire during
connection retries if it's lower than the time needed to cover the
amount of retries, so clients get a 408 when the connection to the
server fails to establish fast enough.

The reason is that the CF_READ_NOEXP flag is set after the MSG_DONE state
is reached, which protects the timeout from being re-armed, then during
the retries, process_session() clears the flag without calling the analyser
(since there's no activity for it), so the timeouts are rearmed.

Ideally, these one-shot flags should be per-analyser, and the analyser
which sets them would be responsible for clearing them, or they would
automatically be cleared when switching to another analyser. Unfortunately
this is not really possible currently.

What can be done however is to only clear them in the following situations :
  - we're going to call analysers
  - analysers have all been unsubscribed

This method seems reliable enough and approaches the ideal case well enough.

No backport is needed, this bug was introduced in 1.5-dev25.
src/session.c