diff src/core/ngx_string.c @ 320:1e9e2c5e7c14 NGINX_0_5_30

nginx 0.5.30 *) Feature: the $args variable can be set with the "set" directive. *) Feature: the $is_args variable. *) Bugfix: if a client has closed connection to mail proxy then nginx might not close connection to backend. *) Bugfix: now nginx escapes space in $memcached_key variable. *) Bugfix: a segmentation fault might occur in worker process when the HTTPS protocol was used in the "proxy_pass" directive. *) Bugfix: the perl $$ variable value in ngx_http_perl_module was equal to the master process identification number. *) Bugfix: fix building on Solaris/amd64 by Sun Studio 11 and early versions; bug appeared in 0.5.29.
author Igor Sysoev <http://sysoev.ru>
date Mon, 30 Jul 2007 00:00:00 +0400
parents 3021f899881a
children 7cf404023f50
line wrap: on
line diff
--- a/src/core/ngx_string.c
+++ b/src/core/ngx_string.c
@@ -1059,7 +1059,27 @@ ngx_escape_uri(u_char *dst, u_char *src,
         0xffffffff  /* 1111 1111 1111 1111  1111 1111 1111 1111 */
     };
 
-    static uint32_t  *map[] = { uri, args, html, refresh };
+                    /* " ", %00-%1F */
+
+    static uint32_t   memcached[] = {
+        0xffffffff, /* 1111 1111 1111 1111  1111 1111 1111 1111 */
+
+                    /* ?>=< ;:98 7654 3210  /.-, +*)( '&%$ #"!  */
+        0x00000001, /* 0000 0000 0000 0000  0000 0000 0000 0001 */
+
+                    /* _^]\ [ZYX WVUT SRQP  ONML KJIH GFED CBA@ */
+        0x00000000, /* 0000 0000 0000 0000  0000 0000 0000 0000 */
+
+                    /*  ~}| {zyx wvut srqp  onml kjih gfed cba` */
+        0x00000000, /* 0000 0000 0000 0000  0000 0000 0000 0000 */
+
+        0x00000000, /* 0000 0000 0000 0000  0000 0000 0000 0000 */
+        0x00000000, /* 0000 0000 0000 0000  0000 0000 0000 0000 */
+        0x00000000, /* 0000 0000 0000 0000  0000 0000 0000 0000 */
+        0x00000000, /* 0000 0000 0000 0000  0000 0000 0000 0000 */
+    };
+
+    static uint32_t  *map[] = { uri, args, html, refresh, memcached };
 
 
     escape = map[type];