| 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 = { |