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