@samitouri / QOS-React-2 / commits / b5b60a6acf

speed up server middleware slightly

Thomas Aylott committed Nov 15, 2013 at 16:29 UTC b5b60a6acf0cb28d287a9226bcc38578b7c2ce53
1 file changed +3 -2
grunt/config/server.js
+3 -2
@@ -6,6 +6,9 @@ module.exports = function(grunt) {
6 if (!(req.method == 'POST' && req._parsedUrl.pathname.indexOf('/reportTestResults') === 0)) {
7 return next();
8 }
9 + res.write('<!doctype html><meta charset=utf-8>');
10 + res.end('Got it, thanks!');
11 +
12 var logType = 'writeln';
13 var message = req.body;
14
@@ -23,8 +26,6 @@ module.exports = function(grunt) {
26 message = JSON.stringify(message, null, 2);
27 }
28 grunt.log[logType]('[%s][%s]', req.headers['user-agent'], Date.now(), message);
26 - res.write('<!doctype html><meta charset=utf-8>');
27 - res.end('Got it, thanks!');
29 }
30
31 return {