GWicke has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/92611


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

Upgrade express to 3.x and enable compression

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid 
refs/changes/11/92611/1

diff --git a/js/api/ParserService.js b/js/api/ParserService.js
index 378bc25..5e01a22 100644
--- a/js/api/ParserService.js
+++ b/js/api/ParserService.js
@@ -346,9 +346,12 @@
 
 /* -------------------- web app access points below --------------------- */
 
-var app = express.createServer();
+var app = express();
+// Support gzip / deflate transfer-encoding
+app.use(express.compress());
+
 // Increase the form field size limit from the 2M default.
-app.use(express.bodyParser({maxFieldsSize: 15 * 1024 * 1024}));
+app.use(express.urlencoded({limit: 25 * 1024 * 1024}));
 
 app.get('/', function(req, res){
        res.write('<html><body>\n');
@@ -693,47 +696,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: newchange
Gerrit-Change-Id: I529432489235f9dee98f1cbd70f2dbf483613f26
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke <[email protected]>

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

Reply via email to