ðòïåëôù 


  áòèé÷ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  óôáôøé 


  ðåòóïîáìøîïå 


  ðòïçòáííù 



ðéûéôå
ðéóøíá












     áòèé÷ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: $upstream_addr contains name of upstream



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@xxxxxxxxxxx
osa@xxxxxxxxxxx

_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.