зеркало из https://github.com/mozilla/pjs.git
Changes URI encoding so that the hex letters are capitalized,
which is important in oAuth. According to rfc3986: 2.1. Percent-Encoding [...] 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.
This commit is contained in:
Родитель
9b67c8ecf4
Коммит
75220aef73
|
@ -607,7 +607,7 @@ public class NativeGlobal implements Serializable, IdFunctionCall
|
|||
|
||||
private static char toHexChar(int i) {
|
||||
if (i >> 4 != 0) Kit.codeBug();
|
||||
return (char)((i < 10) ? i + '0' : i - 10 + 'a');
|
||||
return (char)((i < 10) ? i + '0' : i - 10 + 'A');
|
||||
}
|
||||
|
||||
private static int unHex(char c) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче