Mercurial > hg > nginx
comparison src/core/ngx_string.c @ 5772:d421be0d842a
Core: use uppercase hexadecimal digits for percent-encoding.
RFC3986 says that, for consistency, URI producers and normalizers
should use uppercase hexadecimal digits for all percent-encodings.
This is also what modern web browsers and other tools use.
Using lowercase hexadecimal digits makes it harder to interact with
those tools in case when use of the percent-encoded URI is required,
for example when $request_uri is part of the cache key.
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
author | Piotr Sikora <piotr@cloudflare.com> |
---|---|
date | Thu, 26 Jun 2014 23:39:23 -0700 |
parents | a602e1006579 |
children | 33c08d7e2915 |
comparison
equal
deleted
inserted
replaced
5771:c3b08217f2a2 | 5772:d421be0d842a |
---|---|
1405 uintptr_t | 1405 uintptr_t |
1406 ngx_escape_uri(u_char *dst, u_char *src, size_t size, ngx_uint_t type) | 1406 ngx_escape_uri(u_char *dst, u_char *src, size_t size, ngx_uint_t type) |
1407 { | 1407 { |
1408 ngx_uint_t n; | 1408 ngx_uint_t n; |
1409 uint32_t *escape; | 1409 uint32_t *escape; |
1410 static u_char hex[] = "0123456789abcdef"; | 1410 static u_char hex[] = "0123456789ABCDEF"; |
1411 | 1411 |
1412 /* " ", "#", "%", "?", %00-%1F, %7F-%FF */ | 1412 /* " ", "#", "%", "?", %00-%1F, %7F-%FF */ |
1413 | 1413 |
1414 static uint32_t uri[] = { | 1414 static uint32_t uri[] = { |
1415 0xffffffff, /* 1111 1111 1111 1111 1111 1111 1111 1111 */ | 1415 0xffffffff, /* 1111 1111 1111 1111 1111 1111 1111 1111 */ |