Skip to content

Commit

Permalink
feat: check pseudo-header
Browse files Browse the repository at this point in the history
  • Loading branch information
tsctx committed Nov 9, 2023
1 parent e1e76b9 commit e5ab3d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/fetch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2002,7 +2002,8 @@ async function httpNetworkFetch (
location = val
}

headers.append(key, val)
// Note: Not allow pseudo-header for H2. e.g. `:status`
if (key.charCodeAt(0) !== 58) headers.append(key, val)
}
} else {
const keys = Object.keys(headersList)
Expand All @@ -2016,7 +2017,8 @@ async function httpNetworkFetch (
location = val
}

headers.append(key, val)
// Note: Not allow pseudo-header for H2. e.g. `:status`
if (key.charCodeAt(0) !== 58) headers.append(key, val)
}
}

Expand Down

0 comments on commit e5ab3d5

Please sign in to comment.