Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_memcached_module.c @ 3592:fdd0943b277d stable-0.7
merge r3488:
revert partially r1555 and fix the error "memcached sent invalid trailer"
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 07 Jun 2010 11:49:03 +0000 |
parents | 61962127b166 |
children |
comparison
equal
deleted
inserted
replaced
3591:b3cfbb1f0224 | 3592:fdd0943b277d |
---|---|
421 | 421 |
422 if (u->length == ctx->rest) { | 422 if (u->length == ctx->rest) { |
423 | 423 |
424 if (ngx_strncmp(b->last, | 424 if (ngx_strncmp(b->last, |
425 ngx_http_memcached_end + NGX_HTTP_MEMCACHED_END - ctx->rest, | 425 ngx_http_memcached_end + NGX_HTTP_MEMCACHED_END - ctx->rest, |
426 ctx->rest) | 426 bytes) |
427 != 0) | 427 != 0) |
428 { | 428 { |
429 ngx_log_error(NGX_LOG_ERR, ctx->request->connection->log, 0, | 429 ngx_log_error(NGX_LOG_ERR, ctx->request->connection->log, 0, |
430 "memcached sent invalid trailer"); | 430 "memcached sent invalid trailer"); |
431 | |
432 u->length = 0; | |
433 ctx->rest = 0; | |
434 | |
435 return NGX_OK; | |
431 } | 436 } |
432 | 437 |
433 u->length = 0; | 438 u->length -= bytes; |
434 ctx->rest = 0; | 439 ctx->rest -= bytes; |
435 | 440 |
436 return NGX_OK; | 441 return NGX_OK; |
437 } | 442 } |
438 | 443 |
439 for (cl = u->out_bufs, ll = &u->out_bufs; cl; cl = cl->next) { | 444 for (cl = u->out_bufs, ll = &u->out_bufs; cl; cl = cl->next) { |