mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
fix(headers): fixed isValidHeaderName to support full list of allowed characters; (#5584)
This commit is contained in:
@@ -29,9 +29,7 @@ function parseTokens(str) {
|
|||||||
return tokens;
|
return tokens;
|
||||||
}
|
}
|
||||||
|
|
||||||
function isValidHeaderName(str) {
|
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
||||||
return /^[-_a-zA-Z]+$/.test(str.trim());
|
|
||||||
}
|
|
||||||
|
|
||||||
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
||||||
if (utils.isFunction(filter)) {
|
if (utils.isFunction(filter)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user