30 static ngx_int_t ngx_http_memcached_filter_init(
void *data);
31 static ngx_int_t ngx_http_memcached_filter(
void *data, ssize_t bytes);
36 static void *ngx_http_memcached_create_loc_conf(
ngx_conf_t *cf);
37 static char *ngx_http_memcached_merge_loc_conf(
ngx_conf_t *cf,
38 void *parent,
void *child);
58 ngx_http_memcached_pass,
103 &ngx_http_memcached_next_upstream_masks },
126 ngx_http_memcached_create_loc_conf,
127 ngx_http_memcached_merge_loc_conf
133 &ngx_http_memcached_module_ctx,
134 ngx_http_memcached_commands,
150 #define NGX_HTTP_MEMCACHED_END (sizeof(ngx_http_memcached_end) - 1)
151 static u_char ngx_http_memcached_end[] =
CRLF "END" CRLF;
234 "the \"$memcached_key\" variable is not set");
240 len =
sizeof(
"get ") - 1 + vv->
len + escape +
sizeof(
CRLF) - 1;
274 "http memcached request: \"%V\"", &ctx->
key);
318 "memcached: \"%V\"", &line);
325 if (
ngx_strncmp(p,
"VALUE ",
sizeof(
"VALUE ") - 1) == 0) {
327 p +=
sizeof(
"VALUE ") - 1;
331 "memcached sent invalid key in response \"%V\" "
362 flags =
ngx_atoi(start, p - start - 1);
366 "memcached sent invalid flags in response \"%V\" "
379 h->
key.
len =
sizeof(
"Content-Encoding") - 1;
380 h->
key.
data = (u_char *)
"Content-Encoding";
391 while (*p && *p++ !=
CR) { }
396 "memcached sent invalid length in response \"%V\" "
411 "key: \"%V\" was not found by memcached", &ctx->
key);
423 "memcached sent invalid response: \"%V\"", &line);
430 ngx_http_memcached_filter_init(
void *data)
445 ngx_http_memcached_filter(
void *data, ssize_t bytes)
465 "memcached sent invalid trailer");
504 "memcached filter bytes:%z size:%z length:%z rest:%z",
516 "memcached sent invalid trailer");
543 "abort http memcached request");
552 "finalize http memcached request");
558 ngx_http_memcached_create_loc_conf(
ngx_conf_t *cf)
606 ngx_http_memcached_merge_loc_conf(
ngx_conf_t *cf,
void *parent,
void *child)
662 return "is duplicate";
679 clcf->
handler = ngx_http_memcached_handler;
687 if (mlcf->
index == NGX_ERROR) {