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


                                                                      
                                              


                                                                      
                

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(8080);