revert partially r1555 and fix the error "memcached sent invalid trailer"
This commit is contained in:
parent
ee16f19cf6
commit
5a7f376945
1 changed files with 8 additions and 3 deletions
|
@ -432,15 +432,20 @@ ngx_http_memcached_filter(void *data, ssize_t bytes)
|
||||||
|
|
||||||
if (ngx_strncmp(b->last,
|
if (ngx_strncmp(b->last,
|
||||||
ngx_http_memcached_end + NGX_HTTP_MEMCACHED_END - ctx->rest,
|
ngx_http_memcached_end + NGX_HTTP_MEMCACHED_END - ctx->rest,
|
||||||
ctx->rest)
|
bytes)
|
||||||
!= 0)
|
!= 0)
|
||||||
{
|
{
|
||||||
ngx_log_error(NGX_LOG_ERR, ctx->request->connection->log, 0,
|
ngx_log_error(NGX_LOG_ERR, ctx->request->connection->log, 0,
|
||||||
"memcached sent invalid trailer");
|
"memcached sent invalid trailer");
|
||||||
|
|
||||||
|
u->length = 0;
|
||||||
|
ctx->rest = 0;
|
||||||
|
|
||||||
|
return NGX_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
u->length = 0;
|
u->length -= bytes;
|
||||||
ctx->rest = 0;
|
ctx->rest -= bytes;
|
||||||
|
|
||||||
return NGX_OK;
|
return NGX_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue