Skip to content
Merged
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
Next Next commit
http: tweak regex
  • Loading branch information
Wing Leung committed Aug 16, 2022
commit 82dea4cdc58c8c7501cb5b84e224643684e599fc
2 changes: 1 addition & 1 deletion lib/internal/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ function validateUnion(value, name, union) {
}

function validateLinkHeaderValue(value, name) {
const linkValueRegExp = /^(?:<[^>]*>;)\s*(?:rel="?[^;]*"?;?)\s*(?:(?:as|anchor|title)="?.*"?)?$/;
const linkValueRegExp = /^(?:<[^>]*>;)\s*(?:rel=(")?[^;"]*\1;?)\s*(?:(?:as|anchor|title)=(")?[^;"]*\2)?$/;

if (
typeof value === 'undefined' ||
Expand Down