diff options
author | Zhiming Wang <zmwangx@gmail.com> | 2014-06-29 19:48:01 -0700 |
---|---|---|
committer | Nicolas Williams <nico@cryptonector.com> | 2014-06-30 19:52:42 -0500 |
commit | a5e908667693f96ac9fc6b62f061d693ee63e089 (patch) | |
tree | 052a034e6aeffc6f1d5121901abbb9e54cdc2b24 /builtin.c | |
parent | 1204e328dfebb46c6389a9b50a353ce0d5eb10a7 (diff) |
Let @uri produce uppercase hexadecimal digits...
instead of lowercase ones.
According to RFC 3986,
The uppercase hexadecimal digits 'A' through 'F' are equivalent to
the lowercase digits 'a' through 'f', respectively. If two URIs
differ only in the case of hexadecimal digits used in percent-encoded
octets, they are equivalent. For consistency, URI producers and
normalizers should use uppercase hexadecimal digits for all percent-
encodings.
See https://github.com/stedolan/jq/issues/451 for details.
Test suite and manual are also updated to reflect this change.
Signed-off-by: Nicolas Williams <nico@cryptonector.com>
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -413,7 +413,7 @@ static jv f_format(jv input, jv fmt) { if (ch < 128 && unreserved[ch]) { line = jv_string_append_buf(line, s, 1); } else { - line = jv_string_concat(line, jv_string_fmt("%%%02x", ch)); + line = jv_string_concat(line, jv_string_fmt("%%%02X", ch)); } s++; } |