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
This commit is contained in:
Sandro Santilli 2014-02-28 10:54:18 +01:00
parent 16e67387c9
commit 73276b1003
5 changed files with 9 additions and 7 deletions

View File

@ -4,6 +4,9 @@
Enhancements: Enhancements:
- Really skip CDB_TableMetadata lookup for sql affected by no tables (#169) - 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 1.8.3 -- 2014-02-27
------------------- -------------------

4
npm-shrinkwrap.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "windshaft-cartodb", "name": "windshaft-cartodb",
"version": "1.8.3", "version": "1.8.4",
"dependencies": { "dependencies": {
"node-varnish": { "node-varnish": {
"version": "0.2.0", "version": "0.2.0",
@ -11,7 +11,7 @@
}, },
"windshaft": { "windshaft": {
"version": "0.19.1", "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": { "dependencies": {
"grainstore": { "grainstore": {
"version": "0.18.0", "version": "0.18.0",

View File

@ -24,7 +24,7 @@
"dependencies": { "dependencies": {
"node-varnish": "http://github.com/Vizzuality/node-varnish/tarball/v0.2.0", "node-varnish": "http://github.com/Vizzuality/node-varnish/tarball/v0.2.0",
"underscore" : "~1.3.3", "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", "step": "0.0.x",
"request": "2.9.202", "request": "2.9.202",
"cartodb-redis": "~0.3.0", "cartodb-redis": "~0.3.0",

View File

@ -493,7 +493,7 @@ suite('multilayer', function() {
headers: {host: 'localhost', 'Content-Type': 'application/json' }, headers: {host: 'localhost', 'Content-Type': 'application/json' },
data: JSON.stringify(layergroup) data: JSON.stringify(layergroup)
}, {}, function(res) { }, {}, 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 parsed = JSON.parse(res.body);
var msg = parsed.errors[0]; var msg = parsed.errors[0];
assert.ok(msg.match(/bogus.*exist/), msg); assert.ok(msg.match(/bogus.*exist/), msg);

View File

@ -134,8 +134,7 @@ suite('server', function() {
method: 'GET' method: 'GET'
},{ },{
}, function(res) { }, function(res) {
// FIXME: should be 401 Unauthorized assert.equal(res.statusCode, 401, res.statusCode + ':' + res.body);
assert.equal(res.statusCode, 400, res.body);
assert.deepEqual(JSON.parse(res.body), assert.deepEqual(JSON.parse(res.body),
{error: 'Sorry, you are unauthorized (permission denied)'}); {error: 'Sorry, you are unauthorized (permission denied)'});
assert.ok(!res.headers.hasOwnProperty('cache-control')); assert.ok(!res.headers.hasOwnProperty('cache-control'));
@ -419,7 +418,7 @@ suite('server', function() {
headers: {host: 'localhost'}, headers: {host: 'localhost'},
},{}, function(res) { },{}, function(res) {
// FIXME: should be 401 Unauthorized // 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); assert.ok(res.body.indexOf('map state cannot be changed by unauthenticated request') != -1, res.body);
// check that the style wasn't really deleted ! // check that the style wasn't really deleted !
assert.response(server, { assert.response(server, {