summaryrefslogtreecommitdiffhomepage
path: root/src/core/ngx_string.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-07-29 17:27:10 +0000
committerIgor Sysoev <igor@sysoev.ru>2007-07-29 17:27:10 +0000
commit567f8f61f73323f83fedba1a1e2879aa616da52d (patch)
tree3aff8c6826ec738bb838d8d595e0c5dac6afd1b2 /src/core/ngx_string.c
parentd44b42f0bf780b398ff96da3eca0727769bc68fa (diff)
downloadnginx-567f8f61f73323f83fedba1a1e2879aa616da52d.tar.gz
nginx-567f8f61f73323f83fedba1a1e2879aa616da52d.tar.bz2
r1333, r1334 merge:
omit unnecessary code, escape space, etc in $memcached_key
Diffstat (limited to 'src/core/ngx_string.c')
-rw-r--r--src/core/ngx_string.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/core/ngx_string.c b/src/core/ngx_string.c
index 6a927b03b..a07dbebeb 100644
--- 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, size_t size, ngx_uint_t type)
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];