diff options
author | dormando <dormando@rydia.net> | 2023-02-28 18:55:27 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2023-02-28 18:55:27 -0800 |
commit | 1a68343596ffb53a4feb58348964afbba9e387e0 (patch) | |
tree | b3b052ec536cf56a7cb19600c44ea2572db19597 /proxy_network.c | |
parent | b72d969ab84998ad3a8f91e37f83eaaf8e4fd8b5 (diff) | |
download | memcached-1a68343596ffb53a4feb58348964afbba9e387e0.tar.gz |
proxy: fix trailingdata error with ascii multiget
One of the side effects of pre-warming all of the tests I did with
multiget, and not having done a second round on the unit tests, is that
we somehow never tried an ascii multiget against a damn miss.
Easy to test, easy to fix.
Diffstat (limited to 'proxy_network.c')
-rw-r--r-- | proxy_network.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/proxy_network.c b/proxy_network.c index 0334971..e18516f 100644 --- a/proxy_network.c +++ b/proxy_network.c @@ -1037,6 +1037,11 @@ static int proxy_backend_drive_machine(mcp_backend_t *be) { if (p->ascii_multiget && r->resp.type == MCMC_RESP_END) { // Ascii multiget hack mode; consume END's + be->rbufused -= r->resp.reslen; + if (be->rbufused > 0) { + memmove(be->rbuf, be->rbuf+r->resp.reslen, be->rbufused); + } + be->state = mcp_backend_next; break; } |