Skip to content

Commit

Permalink
Merge pull request socketio#401 from Pita/master
Browse files Browse the repository at this point in the history
Send response once we got all POST data, not immediately
  • Loading branch information
rauchg committed Jul 31, 2011
2 parents 0b9b28d + f69f387 commit a1c997b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/transports/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ HTTPTransport.prototype.handleRequest = function (req) {
});

req.on('end', function () {
res.writeHead(200, headers);
res.end('1');

self.onData(self.postEncoded ? qs.parse(buffer).d : buffer);
});

Expand All @@ -65,9 +68,6 @@ HTTPTransport.prototype.handleRequest = function (req) {
headers['Access-Control-Allow-Credentials'] = 'true';
}
}

res.writeHead(200, headers);
res.end('1');
} else {
this.response = req.res;

Expand Down

0 comments on commit a1c997b

Please sign in to comment.