-
Notifications
You must be signed in to change notification settings - Fork 28.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
url: fix surrogate handling in encodeAuth()
Also factor out common parts in querystring and url. Backport-of: #11161
- Loading branch information
1 parent
7e37628
commit 8dbd562
Showing
6 changed files
with
104 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
'use strict'; | ||
|
||
const hexTable = new Array(256); | ||
for (var i = 0; i < 256; ++i) | ||
hexTable[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase(); | ||
|
||
// Instantiating this is faster than explicitly calling `Object.create(null)` | ||
// to get a "clean" empty object (tested with v8 v4.9). | ||
function StorageObject() {} | ||
StorageObject.prototype = Object.create(null); | ||
|
||
module.exports = { | ||
hexTable, | ||
StorageObject | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8dbd562
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@italoacasas ... just a heads up, even backport commits need to have the appropriate PR-URL and reviewed-by metadata. Typically those are pulled from the original PR unless the backport PR includes additional changes