]> git.kaiwu.me - nginx.git/commit
Memcached: stricten header validation.
authorRuslan Ermilov <ru@nginx.com>
Thu, 23 May 2013 12:26:10 +0000 (16:26 +0400)
committerRuslan Ermilov <ru@nginx.com>
Thu, 23 May 2013 12:26:10 +0000 (16:26 +0400)
commit2c0ea0fcc854a1ba0c717fa78b03ac7faee12829
tree70eb5fa7fc652eab2609062978f10ff37bdd4d91
parent3be6cc9b2f85724c37d5cf5e9f71bbded656b9cd
Memcached: stricten header validation.

An invalid memcached reply that started with '\n' could cause
segmentation fault.

An invalid memcached reply "VALUE / 0 2\r?ok\r\nEND\r\n" was
considered as a valid response.

In addition, if memcached reports that the key was not found,
set u->headers_in.content_length_n to 0.  This ensures that
ngx_http_memcached_filter() will not be called while previous
code relied on always intercepting 404.  Initialization of
ctx->rest was moved to where it belongs.
src/http/modules/ngx_http_memcached_module.c