Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup: revert the changes
  • Loading branch information
PoojaDurgad committed Nov 30, 2020
commit 9201949674ac57faa12688d99b4638116bb17784
5 changes: 2 additions & 3 deletions lib/_http_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

const {
MathMin,
RegExpPrototypeTest,
Symbol,
} = primordials;
const { setImmediate } = require('timers');
Expand Down Expand Up @@ -218,7 +217,7 @@ const tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/;
* See https://tools.ietf.org/html/rfc7230#section-3.2.6
*/
function checkIsHttpToken(val) {
return RegExpPrototypeTest(tokenRegExp, val);
return tokenRegExp.test(val);
}

const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
Expand All @@ -229,7 +228,7 @@ const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
* field-vchar = VCHAR / obs-text
*/
function checkInvalidHeaderChar(val) {
return RegExpPrototypeTest(headerCharRegex, val);
return headerCharRegex.test(val);
}

function cleanParser(parser) {
Expand Down