You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fieldValueRegexp.test('a b'); //true
fieldValueRegexp.test('a b c'); //false
fieldValueRegexp.test('aa bb cc dd'); //true
fieldValueRegexp.test('this is a test'); //false
The text was updated successfully, but these errors were encountered:
Hi, @domenic
I have a header as X-our-own-header: the value is a fixed phrase.
The request fails as "the value is a fixed phrase." is invalid at jsdom, which behaves differently from my browser (chrome).
fieldValueRegexp.test('the value is a fixed phrase.') // false
Thank you!
Maybe it should be /^[ \t]*(?:[\x20-\x7E\x80-\xFF](?:[ \t]+[\x20-\x7E\x80-\xFF])?)*[ \t]*$/ because '\x20' could be a "visible [USASCII] character" but I am not sure. Also note that 1*( SP / HTAB ) should give [ \t]+ and not [ \t].
I have some Http header value fails during the validation. I think the regexp works improper.
jsdom\lib\jsdom\living\helpers\headers.js line 11.
exports.fieldValueRegexp = /^[ \t]*(?:[\x21-\x7E\x80-\xFF](?:[ \t][\x21-\x7E\x80-\xFF])?)*[ \t]*$/;
test case:
The text was updated successfully, but these errors were encountered: