summaryrefslogblamecommitdiffhomepage
path: root/test/node/remove_header/app.js
blob: 2a59123516c348abfd2cf7e5951ba921a7107329 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
 
                                                  


                                                                      
                                              



                                                                      

require('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);