diff options
Diffstat (limited to 'ext/http/01_http.js')
-rw-r--r-- | ext/http/01_http.js | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/ext/http/01_http.js b/ext/http/01_http.js index 6df26d09f..63023a296 100644 --- a/ext/http/01_http.js +++ b/ext/http/01_http.js @@ -477,17 +477,9 @@ function upgradeHttp(req) { if (req[_flash]) { - // NOTE(bartlomieju): - // Access these fields so they are cached on `req` object, otherwise - // they wouldn't be available after the connection gets upgraded. - req.url; - req.method; - req.headers; - - const { serverId, streamRid } = req[_flash]; - const connRid = core.ops.op_flash_upgrade_http(streamRid, serverId); - // TODO(@littledivy): return already read first packet too. - return [new TcpConn(connRid), new Uint8Array()]; + throw new TypeError( + "Flash requests can not be upgraded with `upgradeHttp`. Use `upgradeHttpRaw` instead.", + ); } req[_deferred] = new Deferred(); |