MCPcopy
hub / github.com/socketio/socket.io / testForHeaders

Function testForHeaders

packages/engine.io/test/server.js:3506–3520  ·  packages/engine.io/test/server.js::testForHeaders
(headers, callback)

Source from the content-addressed store, hash-verified

3504
3505 describe(class="st">"response headers", () => {
3506 function testForHeaders(headers, callback) {
3507 const engine = listen((port) => {
3508 engine.on(class="st">"connection", (conn) => {
3509 conn.transport.once(class="st">"headers", (headers) => {
3510 callback(headers);
3511 conn.close();
3512 });
3513 conn.send(class="st">"hi");
3514 });
3515 new ClientSocket(`ws:class="cm">//localhost:${port}`, {
3516 extraHeaders: headers,
3517 transports: [class="st">"polling"],
3518 });
3519 });
3520 }
3521
3522 it(class="st">"should contain X-XSS-Protection: 0 for IE8", (done) => {
3523 const headers = {

Callers 1

server.jsFile · 0.85

Calls 5

listenFunction · 0.85
callbackFunction · 0.50
onMethod · 0.45
closeMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected