From 5daa290d20c9868d2650c2ad8134144b95ed1ffb Mon Sep 17 00:00:00 2001 From: Kris Zyp Date: Tue, 29 Oct 2013 10:46:53 -0600 Subject: [PATCH 1/4] Allow value in query url encoding to be undefined --- media/url-encoded.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/url-encoded.js b/media/url-encoded.js index 2724bcb..fd82b44 100644 --- a/media/url-encoded.js +++ b/media/url-encoded.js @@ -34,7 +34,7 @@ Media({ var props = {}; for(var i = 0; i < parts.length; i++){ var nameValue = parts[i].split("="); - var value = decodeURIComponent(nameValue[1].replace(/\+/g, ' ')); + var value = decodeURIComponent(nameValue[1] && nameValue[1].replace(/\+/g, ' ')); var key = decodeURIComponent(nameValue[0].replace(/\+/g, ' ')); value = stringToValue(value); // N.B. multiple same-named keys should be stored as an array From e5fe66b626c3481f847edb9a048b7a1b3240df94 Mon Sep 17 00:00:00 2001 From: Kris Zyp Date: Tue, 29 Oct 2013 10:47:37 -0600 Subject: [PATCH 2/4] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1f4ca63..b12b419 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pintura", - "version": "0.3.3", + "version": "0.3.4", "author": "Kris Zyp", "email": "kriszyp@gmail.com", "description": "JSGI-based RESTful JSON/JavaScript server", From 83cb6ae94006b09f35ac27903c3f84eeb86107c7 Mon Sep 17 00:00:00 2001 From: Kris Zyp Date: Tue, 29 Oct 2013 16:04:53 -0600 Subject: [PATCH 3/4] Return forEach result so that jsgi-node properly waits for the completion of the streaming --- media.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media.js b/media.js index f136177..17a8c24 100644 --- a/media.js +++ b/media.js @@ -68,7 +68,7 @@ Media.optimumMedia = function(source, acceptTypeHeader){ // loadFile could return a promise forEach: function(each){ return when(exports.loadFile(alternate), function(file){ - file.forEach(each); + return file.forEach(each); }); } }; From 0431346ce37bb150efe951dcd82115a7baf7c79a Mon Sep 17 00:00:00 2001 From: Kris Zyp Date: Tue, 29 Oct 2013 16:15:11 -0600 Subject: [PATCH 4/4] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b12b419..72259c0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pintura", - "version": "0.3.4", + "version": "0.3.5", "author": "Kris Zyp", "email": "kriszyp@gmail.com", "description": "JSGI-based RESTful JSON/JavaScript server",