BUG/MINOR: cache: also consider CF_SHUTR to abort delivery

The cache runs in an applet, so it delivers data into the input side
of the channel's buffer. Thus it must also abort feeding the buffer
as soon as CF_SHUTR is present, not just CF_SHUTW*, since these last
ones may only appear later. There doesn't seem to be an observable
side effect of this bug, the fix probably doesn't even need to be
backported.
This commit is contained in:
Willy Tarreau 2018-12-16 00:37:45 +01:00
parent 273e964f6e
commit efef323783
1 changed files with 2 additions and 2 deletions

View File

@ -961,7 +961,7 @@ static void htx_cache_io_handler(struct appctx *appctx)
goto out;
}
if (res->flags & (CF_SHUTW|CF_SHUTW_NOW))
if (res->flags & (CF_SHUTW|CF_SHUTR|CF_SHUTW_NOW))
appctx->st0 = HTX_CACHE_END;
if (appctx->st0 == HTX_CACHE_INIT) {
@ -1190,7 +1190,7 @@ static void http_cache_io_handler(struct appctx *appctx)
goto out;
}
if (res->flags & (CF_SHUTW|CF_SHUTW_NOW))
if (res->flags & (CF_SHUTW|CF_SHUTW_NOW|CF_SHUTR))
appctx->st0 = HTTP_CACHE_END;
/* buffer are aligned there, should be fine */