diff --git a/.travis.yml b/.travis.yml index 88a7c137e..afd56ffb9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ node_js: - "iojs" - "0.12" - "0.10" - - "0.8" env: global: diff --git a/lib/middleware/common.js b/lib/middleware/common.js index 979efafee..323d65cc5 100644 --- a/lib/middleware/common.js +++ b/lib/middleware/common.js @@ -81,7 +81,7 @@ var setNoCacheHeaders = function(response) { var setHeavyCacheHeaders = function(response) { - response.setHeader('Cache-Control', ['public', 'max-age=31536000']); + response.setHeader('Cache-Control', 'public, max-age=31536000'); }; diff --git a/lib/middleware/runner.js b/lib/middleware/runner.js index b056bcc9c..fdc735c9a 100644 --- a/lib/middleware/runner.js +++ b/lib/middleware/runner.js @@ -8,7 +8,7 @@ var path = require('path'); var helper = require('../helper'); var log = require('../logger').create(); var constant = require('../constants'); -var json = require('connect').json(); +var json = require('body-parser').json(); // TODO(vojta): disable when single-run mode var createRunnerMiddleware = function(emitter, fileList, capturedBrowsers, reporter, executor, diff --git a/lib/middleware/source_files.js b/lib/middleware/source_files.js index e20f4d16f..4f303b582 100644 --- a/lib/middleware/source_files.js +++ b/lib/middleware/source_files.js @@ -4,7 +4,6 @@ var querystring = require('querystring'); var common = require('./common'); -var pause = require('connect').utils.pause; var findByPath = function(files, path) { @@ -28,10 +27,7 @@ var createSourceFilesMiddleware = function(filesPromise, serveFile, .replace(/^\/absolute/, '') .replace(/^\/base/, basePath); - // Need to pause the request because of proxying, see: - // https://groups.google.com/forum/#!topic/q-continuum/xr8znxc_K5E/discussion - // TODO(vojta): remove once we don't care about Node 0.8 - var pausedRequest = pause(request); + request.pause(); return filesPromise.then(function(files) { // TODO(vojta): change served to be a map rather then an array @@ -51,7 +47,7 @@ var createSourceFilesMiddleware = function(filesPromise, serveFile, next(); } - pausedRequest.resume(); + request.resume(); }); }; }; diff --git a/package.json b/package.json index d68640c8c..f5f93fb1e 100644 --- a/package.json +++ b/package.json @@ -162,9 +162,10 @@ "Jeff Froom " ], "dependencies": { + "body-parser": "^1.12.4", "chokidar": "^1.0.1", "colors": "^1.1.0", - "connect": "^2.29.2", + "connect": "^3.3.5", "di": "^0.0.1", "glob": "^5.0.6", "graceful-fs": "^3.0.6", @@ -227,7 +228,9 @@ "which": "^1.1.1" }, "main": "./lib/index", - "bin": { "karma": "./bin/karma" }, + "bin": { + "karma": "./bin/karma" + }, "engines": { "node": ">=0.8 <=0.12 || >=1 <=2" },