Skip to content

Instantly share code, notes, and snippets.

@barbuza
Created January 13, 2012 14:00
Show Gist options
  • Save barbuza/1606349 to your computer and use it in GitHub Desktop.
Save barbuza/1606349 to your computer and use it in GitHub Desktop.
--- ../orig/nginx-1.0.11/src/http/modules/ngx_http_memcached_module.c 2010-05-20 15:46:01.000000000 +0400
+++ src/http/modules/ngx_http_memcached_module.c 2012-01-13 17:58:18.000000000 +0400
@@ -312,22 +312,15 @@
if (ngx_strncmp(p, "VALUE ", sizeof("VALUE ") - 1) == 0) {
p += sizeof("VALUE ") - 1;
-
- if (ngx_strncmp(p, ctx->key.data, ctx->key.len) != 0) {
- ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
- "memcached sent invalid key in response \"%V\" "
- "for key \"%V\"",
- &line, &ctx->key);
-
- return NGX_HTTP_UPSTREAM_INVALID_HEADER;
- }
-
- p += ctx->key.len;
-
- if (*p++ != ' ') {
- goto no_valid;
+
+ /* skip key check */
+
+ while (*p) {
+ if (*p++ == ' ') {
+ break;
+ }
}
-
+
/* skip flags */
while (*p) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment