$upstream_addr contains name of upstream
Sergey A. Osokin
osa на macomnet.ru
Вт Дек 15 18:51:47 MSK 2009
On Tue, Dec 15, 2009 at 01:34:29AM -0800, Konstantin Svist wrote:
> On 12/14/2009 11:37 PM, Sergey A. Osokin wrote:
> >On Mon, Dec 14, 2009 at 03:53:29PM -0800, Konstantin Svist wrote:
> >>On 12/14/2009 05:21 AM, Sergey A. Osokin wrote:
> >>>On Sun, Dec 13, 2009 at 02:12:56PM -0800, Konstantin Svist wrote:
А если вот так?
--- ngx_http_redis_module.c.orig 2009-09-22 20:29:31.000000000 +0400
+++ ngx_http_redis_module.c 2009-12-15 18:48:23.000000000 +0300
@@ -362,7 +362,7 @@
ctx = ngx_http_get_module_ctx(r, ngx_http_redis_module);
- if (ngx_strcmp(p, "-ERR") == 0) {
+ if (ngx_strncmp(p, "-ERR", sizeof("-ERR") - 1) == 0) {
ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
"error was received from redis");
@@ -372,11 +372,11 @@
return NGX_OK;
}
- if (ngx_strcmp(p, "+OK\x0d") == 0) {
- p += sizeof("+OK") - 1 + sizeof(CRLF) - 1;
+ if (ngx_strncmp(p, "+OK\r\n", sizeof("+OK\r\n") - 1) == 0) {
+ p += sizeof("+OK\r\n") - 1;
}
- if (ngx_strcmp(p, "$-1\x0d") == 0) {
+ if (ngx_strncmp(p, "$-1\r\n", sizeof("$-1\r\n") - 1) == 0) {
ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
"key: \"%V\" was not found by redis", &ctx->key);
--
Sergey A. Osokin,
osa at FreeBSD.ORG
osa at MAcomnet.ru
Подробная информация о списке рассылки nginx-ru