couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject fauxton commit: updated refs/heads/master to ea85d2b
Date Tue, 26 May 2015 13:42:39 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master f93372389 -> ea85d2b76


devserver: fix exception if no accept-header set

PR: #437
PR-URL: https://github.com/apache/couchdb-fauxton/pull/437
Reviewed-By: garren smith <garren.smith@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/ea85d2b7
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/ea85d2b7
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/ea85d2b7

Branch: refs/heads/master
Commit: ea85d2b76e7a16f6b50fe6bc3109b07e2f6eb1a1
Parents: f933723
Author: Robert Kowalski <robertkowalski@apache.org>
Authored: Tue May 26 14:04:20 2015 +0200
Committer: Robert Kowalski <robertkowalski@apache.org>
Committed: Tue May 26 15:46:09 2015 +0200

----------------------------------------------------------------------
 tasks/couchserver.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ea85d2b7/tasks/couchserver.js
----------------------------------------------------------------------
diff --git a/tasks/couchserver.js b/tasks/couchserver.js
index 76237eb..bd953be 100644
--- a/tasks/couchserver.js
+++ b/tasks/couchserver.js
@@ -47,7 +47,7 @@ module.exports = function (grunt) {
 
     http.createServer(function (req, res) {
       var url = req.url.replace('app/', ''),
-          accept = req.headers.accept.split(','),
+          accept = req.headers.accept && req.headers.accept.split(','),
           filePath;
 
       if (setContentSecurityPolicy) {
@@ -79,7 +79,7 @@ module.exports = function (grunt) {
         testSetup.stdout.pipe(process.stdout);
         testSetup.stderr.pipe(process.stderr);
         filePath = path.join('./test/runner.html');
-      } else if (url === '/' && accept[0] !== 'application/json') {
+      } else if (url === '/' && accept && accept[0] !== 'application/json')
{
         // serve main index file from here
         filePath = path.join(dist_dir, 'index.html');
       }


Mime
View raw message