Skip to content

Commit

Permalink
fix(headers): support HTTP2 pseudo-headers
Browse files Browse the repository at this point in the history
which begin with `:` e.g. `:authority`, `:method`, etc.
  • Loading branch information
pcattori committed Dec 5, 2023
1 parent 68fb00e commit ee6c863
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/fetch/src/headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const validators = (http)
* @param {string} name
*/
const validateHeaderName = name => {
if (!/^[\^`\-\w!#$%&'*+.|~]+$/.test(name)) {
if (!/^[\^`\-\w!#$%&'*+.|~:]+$/.test(name)) {
const err = new TypeError(`Header name must be a valid HTTP token [${name}]`);
Object.defineProperty(err, 'code', {value: 'ERR_INVALID_HTTP_TOKEN'});
throw err;
Expand Down

0 comments on commit ee6c863

Please sign in to comment.