Files
tubestation/testing/web-platform/tests/websockets/constants.js
Arno Renevier 7215fd328b Bug 1675428 [wpt PR 26406] - websocket over http2, a=testonly
Automatic update from web-platform-tests
WebSockets over HTTP/2 in wptserve

When we detect an extended CONNECT method, we don't use a the handler
provided by the server router. Instead, we create a websocket
dispatcher.

H2Response and H2Request are wrapped into _WebSocketRequest and
_WebSocketConnection. Those objects has the same interfaces and
mod_python request and mp_conn. That way, they can be used by
pywebosocket.

The handshake for the bootstrap websocket method is implemented in
ws_h2_handshake.py

When expose the h2 port in constants.js. Test who source it can add a
"http2" variant, and will use then connect to the websocket over the
http2 connection.

--
Add wpt_flags query param.

Test flags can be passed via the wpt_flags query parameter.

--

wpt-commits: 8693894afe03171381f1dc463bfdb99988dfe6cb, 22dc17b26abe125066efe3ccc47c34a432860011
wpt-pr: 26406
2020-12-17 13:30:49 +00:00

15 lines
466 B
JavaScript

//This file requires server-side substitutions and must be included as constants.js?pipe=sub
var PORT = "{{ports[ws][0]}}";
var PORT_SSL = "{{ports[wss][0]}}";
var PORT_H2 = "{{ports[h2][0]}}";
var SCHEME_DOMAIN_PORT;
if (location.search == '?wss') {
SCHEME_DOMAIN_PORT = 'wss://{{host}}:' + PORT_SSL;
} else if (location.search == '?wpt_flags=h2') {
SCHEME_DOMAIN_PORT = 'wss://{{host}}:' + PORT_H2;
} else {
SCHEME_DOMAIN_PORT = 'ws://{{host}}:' + PORT;
}