Express.js : req.body weirdly gets stacked

EDIT :

To sum up the problem : when I post something using ajax the first time, it sets the req.body value, but this value is never reset, even if I load a page (F5) again, or if I perform another POST request : the data remains set, and it remains at the same value and is never updated again (until I reset the server)

ORIGINAL POST :

I'm noob at using Express.js.

I'm performing a very basic AJAX form submission using the code below.

sites_edit: function(req, res)
{
    if (req.route.method == 'post')
    {
        //console.log('========== POST');
        var oSite = req.param('site');
        var SiteModel = models.Site;
        //console.log(oSite);
        //console.log(req.body);

        var pCallback = function()
        {
            oSite.owner = app.getOwner();
            new SiteModel(oSite).save(function(e)
            {
                //console.log('saved.');
                //console.log(e);
                var aRet = app.analyzeSave(e);
                if (aRet.success)
                    aRet.site = oSite;

                res.json(aRet);
            });
        };

        if (oSite.id)
        {
            models.Site.findById(oSite.id, function(err, oTmpSite)
            {
                if (err)
                    throw new Error(err);

                if (oTmpSite.owner != app.getOwner().id)
                    throw new Exception('bad owner');

                pCallback();
            });
        }
        else
            pCallback();

        return;
    }

    // Handling GET request here
    // (...)
}

Submitted data is like :

site[id]:
site[name]:
site[address]:
site[postal_code]:
site[city]:
site[phone]:
site[email]:

The problem is, when I post the form the first time, I get (generated) errors for the missing fields. But if I submit it another time, I get only one event in network monitoring of Firebug, but I get TWO new node.js POST calls, including "headers already sent" errors. And in addition, the data in req.body gets stacked.

I mean, I get the following output in console :

Starting server in environment: local
Express app started on port 80
POST /configuration/site/enregistrer 200 9ms - 262
Error: Can't set headers after they are sent.
    at ServerResponse.OutgoingMessage.setHeader (http.js:645:11)
    at ServerResponse.res.setHeader (E:\nodejs\projects\arent\node_modules\express\node_modules\connect\lib\patch.js:59:22)
    at next (E:\nodejs\projects\arent\node_modules\express\node_modules\connect\lib\proto.js:153:13)
    at multipart (E:\nodejs\projects\arent\node_modules\express\node_modules\connect\lib\middleware\multipart.js:60:27)
    at module.exports (E:\nodejs\projects\arent\node_modules\express\node_modules\connect\lib\middleware\bodyParser.js:57:9)
    at IncomingMessage.module.exports (E:\nodejs\projects\arent\node_modules\express\node_modules\connect\lib\middleware\urlencode
d.js:68:11)
    at IncomingMessage.EventEmitter.emit (events.js:90:17)
    at IncomingMessage._emitEnd (http.js:366:10)
    at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.js:149:23)
    at Socket.socket.ondata (http.js:1704:22)
POST /configuration/site/enregistrer 200 10ms - 128
Error: Can't set headers after they are sent.
    at ServerResponse.OutgoingMessage.setHeader (http.js:645:11)
    at ServerResponse.res.setHeader (E:\nodejs\projects\arent\node_modules\express\node_modules\connect\lib\patch.js:59:22)
    at next (E:\nodejs\projects\arent\node_modules\express\node_modules\connect\lib\proto.js:153:13)
    at multipart (E:\nodejs\projects\arent\node_modules\express\node_modules\connect\lib\middleware\multipart.js:60:27)
    at module.exports (E:\nodejs\projects\arent\node_modules\express\node_modules\connect\lib\middleware\bodyParser.js:57:9)
    at IncomingMessage.module.exports (E:\nodejs\projects\arent\node_modules\express\node_modules\connect\lib\middleware\urlencode
d.js:68:11)
    at IncomingMessage.EventEmitter.emit (events.js:90:17)
    at IncomingMessage._emitEnd (http.js:366:10)
    at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.js:149:23)
    at Socket.socket.ondata (http.js:1704:22)
POST /configuration/site/enregistrer 200 7ms - 128

If I debug the req.body value, I get :

// First AJAX submit
{ site:
   { id: '',
     name: '',
     address: '',
     postal_code: '',
     city: '',
     phone: '',
     email: '' } }
// Second AJAX submit
{ site:
   { id: '',
     name: [ '', '' ],
     address: [ '', '' ],
     postal_code: [ '', '' ],
     city: [ '', '' ],
     phone: [ '', '' ],
     email: [ 'site[id]=', '' ] } }
// And another POST request is (strangely) handled by Express.js during the 2nd AJAX submit, which leads to third dump of the (apparently updated) variable
{ site:
   { id: '',
     name: [ '', '', '' ],
     address: [ '', '', '' ],
     postal_code: [ '', '', '' ],
     city: [ '', '', '' ],
     phone: [ '', '', '' ],
     email: [ 'site[id]=', 'site[id]=', '' ] } }

Seriously, what the hell is happening here? Is that even remotely possible?

Thank you a lot in advance for any help!

EDIT:

If I refresh the page after having submitted the form one time, I get DOZENS of "headers already sent" errors, spread among the different HTTP requests (for getting static js/css files).

Errors like below:

Error: Can't set headers after they are sent.
    at ServerResponse.OutgoingMessage.setHeader (http.js:645:11)
    at ServerResponse.res.setHeader (E:\nodejs\projects\arent\node_modules\express\node_modules\connect\lib\patch.js:59:22)
    at next (E:\nodejs\projects\arent\node_modules\express\node_modules\connect\lib\proto.js:153:13)
    at multipart (E:\nodejs\projects\arent\node_modules\express\node_modules\connect\lib\middleware\multipart.js:60:27)
    at module.exports (E:\nodejs\projects\arent\node_modules\express\node_modules\connect\lib\middleware\bodyParser.js:57:9)
    at IncomingMessage.module.exports (E:\nodejs\projects\arent\node_modules\express\node_modules\connect\lib\middleware\urlencode
d.js:68:11)
    at IncomingMessage.EventEmitter.emit (events.js:123:20)
    at Object.resume (E:\nodejs\projects\arent\node_modules\express\node_modules\connect\node_modules\pause\index.js:25:18)
    at resume (E:\nodejs\projects\arent\node_modules\express\node_modules\connect\lib\middleware\static.js:61:13)
    at SendStream.error (E:\nodejs\projects\arent\node_modules\express\node_modules\connect\lib\middleware\static.js:73:37)

If I refresh the page BEFORE submitting in AJAX, I do never get these errors.

Sorry, but the solution is not obvious.

But your expressjs code is weird: my method treatment is often similar to:

app.post('/enregistrer/:site', function (req, res) {
  ...
}

so that I don't have to test the req.route.method.

The error message Can't set headers after they are sent. suggests that you don't end the response, and that the next responses are in the same.

However, you use res.json, which should behave like res.send. So, the response should be sent.

Or, you use res.send ou res.json twice in the response code, then sending again the headers the second time?