comparison src/http/modules/ngx_http_memcached_module.c @ 4118:dbddec65fdab

Upstream: r->upstream->length type change to off_t. Previous use of size_t may cause wierd effects on 32bit platforms with certain big responses transferred in unbuffered mode. Nuke "if (size > u->length)" check as it's not usefull anyway (preread body data isn't subject to this check) and now requires additional check for u->length being positive.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 15 Sep 2011 18:43:19 +0000
parents 103b0d9afe07
children 16c60162c35b
comparison
equal deleted inserted replaced
4117:103b0d9afe07 4118:dbddec65fdab
405 ngx_http_upstream_t *u; 405 ngx_http_upstream_t *u;
406 406
407 u = ctx->request->upstream; 407 u = ctx->request->upstream;
408 b = &u->buffer; 408 b = &u->buffer;
409 409
410 if (u->length == ctx->rest) { 410 if (u->length == (ssize_t) ctx->rest) {
411 411
412 if (ngx_strncmp(b->last, 412 if (ngx_strncmp(b->last,
413 ngx_http_memcached_end + NGX_HTTP_MEMCACHED_END - ctx->rest, 413 ngx_http_memcached_end + NGX_HTTP_MEMCACHED_END - ctx->rest,
414 bytes) 414 bytes)
415 != 0) 415 != 0)