Update "urlParse" params. #3581

Closed
wants to merge 2 commits into from
View
4 lib/url.js
@@ -89,7 +89,7 @@ var protocolPattern = /^([a-z0-9.+-]+:)/i,
},
querystring = require('querystring');
-function urlParse(url, parseQueryString, slashesDenoteHost) {
+function urlParse(url, parseQueryString, slashesDenoteHost, options) {
if (url && typeof(url) === 'object' && url.href) return url;
if (typeof url !== 'string') {
@@ -286,7 +286,7 @@ function urlParse(url, parseQueryString, slashesDenoteHost) {
out.search = rest.substr(qm);
out.query = rest.substr(qm + 1);
if (parseQueryString) {
- out.query = querystring.parse(out.query);
+ out.query = querystring.parse(out.query, null, null, options);
}
rest = rest.slice(0, qm);
} else if (parseQueryString) {
View
4 lib/util.js
@@ -457,8 +457,8 @@ function timestamp() {
}
-exports.log = function(msg) {
- exports.puts(timestamp() + ' - ' + msg.toString());
+exports.log = function(msg, timestampValue) {
+ exports.puts(typeof timestampValue != "undefined" ? timestampValue.toString() : timestamp() + ' - ' + msg.toString());
};