@@ -184,7 +184,7 @@ exports.canonicalizeResource = function(resource){
     buf.push(key + val);
   });
 
-  return path + buf.length
+  return path + (buf.length
     ? '?' + buf.sort().join('&')
-    : '';
+    : '');
 };