summaryrefslogtreecommitdiff
path: root/ext/fetch/23_request.js
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2021-09-25 10:02:26 +0200
committerGitHub <noreply@github.com>2021-09-25 10:02:26 +0200
commit16ea39ee483ec8d256b0361485a7550e158b5fb1 (patch)
treeac4f1cbf6eaa0725fe9c8615c9899b06f878fa87 /ext/fetch/23_request.js
parent1a6249c9717288e37873b692abac831f11c30f4e (diff)
fix(ext/http): fortify "is websocket?" check (#12179)
Check for expected headers more rigorously and check that it's a HTTP/1.1 GET request. The logic mirrors what Deno Deploy and the tungstenite crate do. The presence of "Sec-Websocket-Version: 13" is now also enforced. I don't expect that to break anything: conforming clients already send it and tungstenite can't talk to older clients anyway. The new code is more efficient due to heap-allocating less and aligns more closely with the checks in ext/http/01_http.js now.
Diffstat (limited to 'ext/fetch/23_request.js')
0 files changed, 0 insertions, 0 deletions