merge r3488:

revert partially r1555 and fix the error "memcached sent invalid trailer"
This commit is contained in:
Igor Sysoev 2010-06-07 11:49:03 +00:00
parent 64a572cb8c
commit f93f77f431
1 changed files with 8 additions and 3 deletions

View File

@ -423,15 +423,20 @@ ngx_http_memcached_filter(void *data, ssize_t bytes)
if (ngx_strncmp(b->last,
ngx_http_memcached_end + NGX_HTTP_MEMCACHED_END - ctx->rest,
ctx->rest)
bytes)
!= 0)
{
ngx_log_error(NGX_LOG_ERR, ctx->request->connection->log, 0,
"memcached sent invalid trailer");
u->length = 0;
ctx->rest = 0;
return NGX_OK;
}
u->length = 0;
ctx->rest = 0;
u->length -= bytes;
ctx->rest -= bytes;
return NGX_OK;
}