Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Update "urlParse" params. #3581

wants to merge 2 commits into from

5 participants


Add "option" param to "urlParse" for "querystring.parse".

@invalid-email-address invalid-email-address Update "urlParse" params.
Add "option" param to "urlParse" for "querystring.parse".

I'm going to push back on feature creep in v0.9 so my first question is: why do you need this? :-)


To have the ability to limit the number of querystring parameters that are parsed, that's why "option" parameter has been added to "querystring.parse" in node-v0.8.0.

Users should have access to the "option" parameter of "querystring.parse" use in "urlParse", it can be useful for limiting the number of "GET" variables to parse from "request.url" (default value of "option.maxKeys" is 1000 and users should have the ability to increase or decrease this value).

@Math- Math- Update "log" function.
Add support to customize "timestamp" format and value.

@isaacs You should review this.


Can one of the admins verify this patch?


I'm going to close this, if you'd like to see this feature a new PR would be great. Thanks

@tjfontaine tjfontaine closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 28, 2012
  1. @invalid-email-address

    Update "urlParse" params.

    invalid-email-address committed
    Add "option" param to "urlParse" for "querystring.parse".
Commits on Jun 29, 2012
  1. @Math-

    Update "log" function.

    Math- committed
    Add support to customize "timestamp" format and value.
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/url.js
  2. +2 −2 lib/util.js
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) { = 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) {
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());
Something went wrong with that request. Please try again.