Updated URI escaping table for better conformity with RFC 3986.
Now '>', '<', '"', '^', '\', '}', '|', '{', and '`' are also escaped.
This commit is contained in:
parent
8d727774e3
commit
d4b4cb0438
1 changed files with 4 additions and 6 deletions
|
@ -521,19 +521,17 @@ nxt_encode_uri(u_char *dst, u_char *src, size_t length)
|
|||
|
||||
static const u_char hex[16] = "0123456789ABCDEF";
|
||||
|
||||
/* " ", "#", "%", "?", %00-%1F, %7F-%FF */
|
||||
|
||||
static const uint32_t escape[] = {
|
||||
0xffffffff, /* 1111 1111 1111 1111 1111 1111 1111 1111 */
|
||||
|
||||
/* ?>=< ;:98 7654 3210 /.-, +*)( '&%$ #"! */
|
||||
0x80000029, /* 1000 0000 0000 0000 0000 0000 0010 1001 */
|
||||
0xd000002d, /* 1101 0000 0000 0000 0000 0000 0010 1101 */
|
||||
|
||||
/* _^]\ [ZYX WVUT SRQP ONML KJIH GFED CBA@ */
|
||||
0x00000000, /* 0000 0000 0000 0000 0000 0000 0000 0000 */
|
||||
0x50000000, /* 0101 0000 0000 0000 0000 0000 0000 0000 */
|
||||
|
||||
/* ~}| {zyx wvut srqp onml kjih gfed cba` */
|
||||
0x80000000, /* 1000 0000 0000 0000 0000 0000 0000 0000 */
|
||||
/* ~}| {zyx wvut srqp onml kjih gfed cba` */
|
||||
0xb8000001, /* 1011 1000 0000 0000 0000 0000 0000 0001 */
|
||||
|
||||
0xffffffff, /* 1111 1111 1111 1111 1111 1111 1111 1111 */
|
||||
0xffffffff, /* 1111 1111 1111 1111 1111 1111 1111 1111 */
|
||||
|
|
Loading…
Reference in a new issue