From 73276b10030df4d75a35d7b5b11301062105b4f1 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Fri, 28 Feb 2014 10:54:18 +0100 Subject: [PATCH] Upgrade windshaft to 0.19.2 Fixes obscure "ECONNREFUSED" error message (closes #171) Change some http status responses to be more appropriate to the case --- NEWS.md | 3 +++ npm-shrinkwrap.json | 4 ++-- package.json | 2 +- test/acceptance/multilayer.js | 2 +- test/acceptance/server.js | 5 ++--- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/NEWS.md b/NEWS.md index a9235b5a..07a77aa8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,9 @@ Enhancements: - Really skip CDB_TableMetadata lookup for sql affected by no tables (#169) + - Upgrade windshaft to 0.19.2, see node_modules/windshaft/NEWS + - Clarify obscure "ECONNREFUSED" error message (#171) + - Change some http status responses to be more appropriate to the case 1.8.3 -- 2014-02-27 ------------------- diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index ff32a74c..810d7737 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,6 +1,6 @@ { "name": "windshaft-cartodb", - "version": "1.8.3", + "version": "1.8.4", "dependencies": { "node-varnish": { "version": "0.2.0", @@ -11,7 +11,7 @@ }, "windshaft": { "version": "0.19.1", - "from": "http://github.com/CartoDB/Windshaft/tarball/0.19.1", + "from": "http://github.com/CartoDB/Windshaft/tarball/0.19.2", "dependencies": { "grainstore": { "version": "0.18.0", diff --git a/package.json b/package.json index c12bed7d..d8771dc3 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "dependencies": { "node-varnish": "http://github.com/Vizzuality/node-varnish/tarball/v0.2.0", "underscore" : "~1.3.3", - "windshaft" : "http://github.com/CartoDB/Windshaft/tarball/0.19.1", + "windshaft" : "http://github.com/CartoDB/Windshaft/tarball/0.19.2", "step": "0.0.x", "request": "2.9.202", "cartodb-redis": "~0.3.0", diff --git a/test/acceptance/multilayer.js b/test/acceptance/multilayer.js index f0c5d281..fa799be9 100644 --- a/test/acceptance/multilayer.js +++ b/test/acceptance/multilayer.js @@ -493,7 +493,7 @@ suite('multilayer', function() { headers: {host: 'localhost', 'Content-Type': 'application/json' }, data: JSON.stringify(layergroup) }, {}, function(res) { - assert.equal(res.statusCode, 400, res.body); + assert.equal(res.statusCode, 404, res.statusCode + ": " + res.body); var parsed = JSON.parse(res.body); var msg = parsed.errors[0]; assert.ok(msg.match(/bogus.*exist/), msg); diff --git a/test/acceptance/server.js b/test/acceptance/server.js index 42fb32f9..7045f5cc 100644 --- a/test/acceptance/server.js +++ b/test/acceptance/server.js @@ -134,8 +134,7 @@ suite('server', function() { method: 'GET' },{ }, function(res) { - // FIXME: should be 401 Unauthorized - assert.equal(res.statusCode, 400, res.body); + assert.equal(res.statusCode, 401, res.statusCode + ':' + res.body); assert.deepEqual(JSON.parse(res.body), {error: 'Sorry, you are unauthorized (permission denied)'}); assert.ok(!res.headers.hasOwnProperty('cache-control')); @@ -419,7 +418,7 @@ suite('server', function() { headers: {host: 'localhost'}, },{}, function(res) { // FIXME: should be 401 Unauthorized - assert.equal(res.statusCode, 500, res.body); + assert.equal(res.statusCode, 400, res.body); assert.ok(res.body.indexOf('map state cannot be changed by unauthenticated request') != -1, res.body); // check that the style wasn't really deleted ! assert.response(server, {