aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_memcached_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules/ngx_http_memcached_module.c')
-rw-r--r--src/http/modules/ngx_http_memcached_module.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/http/modules/ngx_http_memcached_module.c b/src/http/modules/ngx_http_memcached_module.c
index 9a6fb1646..8710d10d3 100644
--- a/src/http/modules/ngx_http_memcached_module.c
+++ b/src/http/modules/ngx_http_memcached_module.c
@@ -183,7 +183,8 @@ ngx_http_memcached_handler(ngx_http_request_t *r)
return NGX_HTTP_INTERNAL_SERVER_ERROR;
}
- u->schema = mlcf->upstream.schema;
+ u->schema.len = sizeof("memcached://") - 1;
+ u->schema.data = (u_char *) "memcached://";
u->peer.log = r->connection->log;
u->peer.log_error = NGX_ERROR_ERR;
@@ -521,7 +522,6 @@ ngx_http_memcached_create_loc_conf(ngx_conf_t *cf)
* conf->upstream.bufs.num = 0;
* conf->upstream.next_upstream = 0;
* conf->upstream.temp_path = NULL;
- * conf->upstream.schema = { 0, NULL };
* conf->upstream.uri = { 0, NULL };
* conf->upstream.location = NULL;
*/
@@ -584,7 +584,6 @@ ngx_http_memcached_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
if (conf->upstream.upstream == NULL) {
conf->upstream.upstream = prev->upstream.upstream;
- conf->upstream.schema = prev->upstream.schema;
}
if (conf->index == NGX_CONF_UNSET) {
@@ -604,7 +603,7 @@ ngx_http_memcached_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
ngx_url_t u;
ngx_http_core_loc_conf_t *clcf;
- if (lcf->upstream.schema.len) {
+ if (lcf->upstream.upstream) {
return "is duplicate";
}
@@ -620,9 +619,6 @@ ngx_http_memcached_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
return NGX_CONF_ERROR;
}
- lcf->upstream.schema.len = sizeof("memcached://") - 1;
- lcf->upstream.schema.data = (u_char *) "memcached://";
-
clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
clcf->handler = ngx_http_memcached_handler;