comparison src/http/modules/ngx_http_memcached_module.c @ 4117:103b0d9afe07

Upstream: content_length_n API change. We no longer use r->headers_out.content_length_n as a primary source of backend's response length. Instead we parse response length to u->headers_in.content_length_n and copy to r->headers_out.content_length_n when needed.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 15 Sep 2011 18:33:43 +0000
parents 66a244ee8cf7
children dbddec65fdab
comparison
equal deleted inserted replaced
4116:9baf12ea5ca1 4117:103b0d9afe07
342 342
343 len = p; 343 len = p;
344 344
345 while (*p && *p++ != CR) { /* void */ } 345 while (*p && *p++ != CR) { /* void */ }
346 346
347 r->headers_out.content_length_n = ngx_atoof(len, p - len - 1); 347 u->headers_in.content_length_n = ngx_atoof(len, p - len - 1);
348 if (r->headers_out.content_length_n == -1) { 348 if (u->headers_in.content_length_n == -1) {
349 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, 349 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
350 "memcached sent invalid length in response \"%V\" " 350 "memcached sent invalid length in response \"%V\" "
351 "for key \"%V\"", 351 "for key \"%V\"",
352 &line, &ctx->key); 352 &line, &ctx->key);
353 return NGX_HTTP_UPSTREAM_INVALID_HEADER; 353 return NGX_HTTP_UPSTREAM_INVALID_HEADER;