summaryrefslogtreecommitdiffhomepage
path: root/test/node/remove_header/app.js
blob: cd7b80c3f80aad0850762e05fd61739288ad04b0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env node

require('unit-http').createServer(function (req, res) {
    res.setHeader('X-Header', 'test');
    res.setHeader('Was-Header', res.hasHeader('X-Header').toString());

    res.removeHeader(req.headers['x-remove']);
    res.setHeader('Has-Header', res.hasHeader('X-Header').toString());

    res.end();
}).listen(7080);