From 9e6893c0c8485e1e8c0094076e3afa173c259851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20P=C3=A9rez?= Date: Sat, 6 Jun 2009 22:09:04 +0200 Subject: [PATCH] Be compatible with Nginx 0.8.0 --- ngx_http_fancyindex_module.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ngx_http_fancyindex_module.c b/ngx_http_fancyindex_module.c index 6352af0..27ca130 100644 --- a/ngx_http_fancyindex_module.c +++ b/ngx_http_fancyindex_module.c @@ -382,7 +382,8 @@ make_content_buf( entry->dir = ngx_de_is_dir(&dir); entry->mtime = ngx_de_mtime(&dir); entry->size = ngx_de_size(&dir); - entry->utf_len = (r->utf8) + entry->utf_len = (r->headers_out.charset.len == 5 && + ngx_strncasecmp(r->headers_out.charset.data, (u_char*) "utf-8", 5) == 0) ? ngx_utf8_length(entry->name.data, entry->name.len) : len; }