18 messages in ru.sysoev.nginxRe: nginx serving wrong website under...
FromSent OnAttachments
Payam ChychiApr 28, 2009 7:26 pm 
Payam ChychiApr 28, 2009 7:55 pm 
Igor SysoevApr 28, 2009 10:48 pm 
Payam ChychiApr 28, 2009 11:39 pm 
Igor SysoevApr 28, 2009 11:44 pm 
Jim OhlsteinMay 2, 2009 8:11 pm 
Jim OhlsteinMay 2, 2009 8:16 pm 
Igor SysoevMay 2, 2009 9:34 pm 
Jim OhlsteinMay 2, 2009 10:18 pm 
Igor SysoevMay 2, 2009 10:29 pm 
Jim OhlsteinMay 2, 2009 11:05 pm 
Igor SysoevMay 2, 2009 11:44 pm 
Jim OhlsteinMay 3, 2009 12:15 am 
Igor SysoevMay 3, 2009 12:28 am 
Jim OhlsteinMay 3, 2009 12:55 pm 
Payam ChychiMay 3, 2009 1:20 pm 
alamgir99May 4, 2009 8:44 am 
Igor SysoevMay 4, 2009 11:45 am.Other
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: nginx serving wrong website under proxy_cacheActions...
From:Igor Sysoev (is@rambler-co.ru)
Date:May 4, 2009 11:45:51 am
List:ru.sysoev.nginx
Attachments:
patch.fastcgi_cache - 0.5k

On Sun, May 03, 2009 at 03:55:58PM -0400, Jim Ohlstein wrote:

I reproduced the error:

2009/05/03 15:34:05 [crit] 4845#0: *178 cache file "/usr/local/nginx/cache/0/da/90e8de013d4126fbab247d12350fdda0" has md5 collision, client: 96.238.94.155, server: mydomain.com, request: "GET /rtwhtrsyrn/010110A/687474702s7777772r777732746s7073697465732r636s6q2s627574746s6r2r7068703s753q776s726p6477617274776s7n6s6r655s636s6q HTTP/1.1", host: "mydomain.com"

The attached patch should fix the bug.

-- Igor Sysoev http://sysoev.ru/en/

Index: src/event/ngx_event_pipe.c =================================================================== --- src/event/ngx_event_pipe.c (revision 2115) +++ src/event/ngx_event_pipe.c (working copy) @@ -397,7 +397,7 @@

p->free_raw_bufs = p->free_raw_bufs->next;

- if (p->free_bufs) { + if (p->free_bufs && p->buf_to_file == NULL) { for (cl = p->free_raw_bufs; cl; cl = cl->next) { if (cl->buf->shadow == NULL) { ngx_pfree(p->pool, cl->buf->start);