How to avoid handler to be called when "clientError" is emitted? It can be done?
var server=http.createServer(app).listen(app.get('port'), function(){
console.log("Express HTTP server listening on port " + app.get('port'));
}).on('clientError', function(ex,socket){
console.log(ex);
//socket is undefined here
});
app.post('/delete-files',handler);
handler = function(req,res){
console.log(req.body.files)
// other stuff goes here
}
I am trying to crash my app by intercepting and modifying POST params with Tamper Data. Post is sent by jQuery post function. Post param is an array. When I modify the array with Tamper Data I got:
Error: Parse Error
undefined
Error: Parse Error
undefined
Error: Parse Error
undefined
Error: Parse Error
undefined
Error: Parse Error
undefined
Error: Parse Error
undefined
Error: Parse Error
undefined
It is always called exactly 7 times.
This should be something related to AJAX
POST param array:
files[] file1.txt
POST param after Tamper Data modification
files[] file5.txt