nginx-devel under FreeBSD: bad memory reference

Igor Sysoev is at rambler-co.ru
Thu Oct 18 23:16:55 MSD 2007


On Thu, Oct 18, 2007 at 05:39:58PM +0400, Dmitry Morozovsky wrote:

> Это когда я попытался построить мап на исходный чарсет
> 
>         include koi-win;
>         include koi-utf;
>         include win-utf;
> 
>         map $host       $srccharset {
>                 hostnames;
>                 default windows-1251;
>                 include srccharsetmap.conf;
>         }
> 
> ...
> 
> 	source_charset  $srccharset;
> 
> При этом, если закомментировать только эту строку - то не падает (но и не 
> работает, ясень перець)

Прилагаемый патч должен помочь.


-- 
Игорь Сысоев
http://sysoev.ru
-------------- next part --------------
Index: src/http/modules/ngx_http_charset_filter_module.c
===================================================================
--- src/http/modules/ngx_http_charset_filter_module.c	(revision 909)
+++ src/http/modules/ngx_http_charset_filter_module.c	(working copy)
@@ -1462,6 +1462,12 @@
         return NGX_CONF_OK;
     }
 
+    if (conf->source_charset >= NGX_HTTP_CHARSET_VAR
+        || conf->charset >= NGX_HTTP_CHARSET_VAR)
+    {
+        return NGX_CONF_OK;
+    }
+
     mcf = ngx_http_conf_get_module_main_conf(cf,
                                              ngx_http_charset_filter_module);
     recode = mcf->recodes.elts;


More information about the nginx-ru mailing list