Skip to content

Commit

Permalink
refactor(vary): use word character class (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Sep 16, 2023
1 parent 061862a commit 120a209
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vary.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const LRUCache = require('mnemonist/lru-cache')
* @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.6
*/

const validFieldnameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/
const validFieldnameRE = /^[!#$%&'*+\-.^\w`|~]+$/u
function validateFieldname (fieldname) {
if (validFieldnameRE.test(fieldname) === false) {
throw new TypeError('Fieldname contains invalid characters.')
Expand Down

0 comments on commit 120a209

Please sign in to comment.