jenkins-bot has submitted this change and it was merged.

Change subject: Upgrade express to 3.x and enable compression
......................................................................


Upgrade express to 3.x and enable compression

Bug: 56282

Change-Id: I529432489235f9dee98f1cbd70f2dbf483613f26
---
M js/api/ParserService.js
M js/package.json
2 files changed, 9 insertions(+), 42 deletions(-)

Approvals:
  Arlolra: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/js/api/ParserService.js b/js/api/ParserService.js
index 233528c..f52d728 100644
--- a/js/api/ParserService.js
+++ b/js/api/ParserService.js
@@ -347,12 +347,18 @@
 
 /* -------------------- web app access points below --------------------- */
 
-var app = express.createServer();
+var app = express();
 
 // favicon
 app.use(express.favicon(path.join(__dirname, "favicon.ico")));
+//
+// Support gzip / deflate transfer-encoding
+app.use(express.compress());
 
 // Increase the form field size limit from the 2M default.
+// This throws deprecation warnings from connect. Need to investigate
+// alternatives- maybe ditch connect completely and go for plain node http
+// instead?
 app.use(express.bodyParser({maxFieldsSize: 15 * 1024 * 1024}));
 
 app.get('/', function(req, res){
@@ -714,47 +720,8 @@
 });
 
 
-/**
- * Continuous integration end points
- *
- * No longer used currently, as our testing now happens on the central Jenkins
- * server.
- */
-app.get( /\/_ci\/refs\/changes\/(\d+)\/(\d+)\/(\d+)/, function ( req, res ) {
-       var gerritChange = 'refs/changes/' + req.params[0] + '/' + 
req.params[1] + '/' + req.params[2];
-       var testSh = spawn( './testGerritChange.sh', [ gerritChange ], {
-               cwd: '.'
-       } );
-
-       res.setHeader('Content-Type', 'text/xml; charset=UTF-8');
-
-       testSh.stdout.on( 'data', function ( data ) {
-               res.write( data );
-       } );
-
-       testSh.on( 'exit', function () {
-               res.end( '' );
-       } );
-} );
-
-app.get( /\/_ci\/master/, function ( req, res ) {
-       var testSh = spawn( './testGerritMaster.sh', [], {
-               cwd: '.'
-       } );
-
-       res.setHeader('Content-Type', 'text/xml; charset=UTF-8');
-
-       testSh.stdout.on( 'data', function ( data ) {
-               res.write( data );
-       } );
-
-       testSh.on( 'exit', function () {
-               res.end( '' );
-       } );
-} );
-
 app.use( express.static( __dirname + '/scripts' ) );
-app.use( express.limit( '15mb' ) );
+app.disable('x-powered-by');
 
 console.log( ' - ' + instanceName + ' ready' );
 
diff --git a/js/package.json b/js/package.json
index 1b556ac..d0ef572 100644
--- a/js/package.json
+++ b/js/package.json
@@ -15,7 +15,7 @@
                "pegjs": "0.7.x",
                "lru-cache": "1.x.x",
                "async": "0.x.x",
-               "express": "2.5.x",
+               "express": ">=3.0.0",
                "html5-entities": "~0.5.0",
                "html5": "0.3.15",
                "es6-shim": 
"git+https://github.com/paulmillr/es6-shim#7dc668687c3a89ed9e7b6d6c6369f0ba8ebf8731";

-- 
To view, visit https://gerrit.wikimedia.org/r/92611
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I529432489235f9dee98f1cbd70f2dbf483613f26
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke <[email protected]>
Gerrit-Reviewer: Arlolra <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>
Gerrit-Reviewer: Marcoil <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to