diff src/http/modules/ngx_http_charset_filter_module.c @ 286:5bef04fc3fd5 NGINX_0_5_13

nginx 0.5.13 *) Feature: the COPY and MOVE methods. *) Bugfix: the ngx_http_realip_module set garbage for requests passed via keep-alive connection. *) Bugfix: nginx did not work on big-endian 64-bit Linux. Thanks to Andrei Nigmatulin. *) Bugfix: now when IMAP/POP3 proxy receives too long command it closes the connection right away, but not after timeout. *) Bugfix: if the "epoll" method was used and a client closed a connection prematurely, then nginx closed the connection after a send timeout only. *) Bugfix: nginx could not be built on platforms different from i386, amd64, sparc and ppc; bug appeared in 0.5.8.
author Igor Sysoev <http://sysoev.ru>
date Mon, 19 Feb 2007 00:00:00 +0300
parents fbf2b2f66c9f
children 3021f899881a
line wrap: on
line diff
--- a/src/http/modules/ngx_http_charset_filter_module.c
+++ b/src/http/modules/ngx_http_charset_filter_module.c
@@ -239,8 +239,10 @@ ngx_http_charset_header_filter(ngx_http_
             } else {
                 ct = r->headers_out.content_type.data;
 
-                if (ngx_strncasecmp(ct, "text/", 5) != 0
-                    && ngx_strncasecmp(ct, "application/x-javascript", 24) != 0)
+                if (ngx_strncasecmp(ct, (u_char *) "text/", 5) != 0
+                    && ngx_strncasecmp(ct,
+                                      (u_char *) "application/x-javascript", 24)
+                       != 0)
                 {
                     return ngx_http_next_header_filter(r);
                 }
@@ -1118,7 +1120,7 @@ ngx_http_charset_map_block(ngx_conf_t *c
     table->src = src;
     table->dst = dst;
 
-    if (ngx_strcasecmp(value[2].data, "utf-8") == 0) {
+    if (ngx_strcasecmp(value[2].data, (u_char *) "utf-8") == 0) {
         table->src2dst = ngx_pcalloc(cf->pool, 256 * NGX_UTF_LEN);
         if (table->src2dst == NULL) {
             return NGX_CONF_ERROR;
@@ -1372,7 +1374,7 @@ ngx_http_add_charset(ngx_array_t *charse
     c->name = *name;
     c->length = 0;
 
-    if (ngx_strcasecmp(name->data, "utf-8") == 0) {
+    if (ngx_strcasecmp(name->data, (u_char *) "utf-8") == 0) {
         c->utf8 = 1;
 
     } else {