summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJosh Gummersall <gumby@moz.com>2015-05-18 21:35:48 -0700
committerRoman Reiss <me@silverwind.io>2015-05-25 13:50:53 +0200
commita74c2c94584aea67276ee15a67d9165bfd4ee9a5 (patch)
tree726b64646a0ccf80a3fdf4fed1d494aa727722bc /doc
parent1eec5f091ab00860539ac2474e47232b31925cea (diff)
downloadnode-new-a74c2c94584aea67276ee15a67d9165bfd4ee9a5.tar.gz
doc: state url decoding behavior
Explicitly states the fact that no decoding is performed on the url path or pathname or the query string by default in the URL module. Fixes: https://github.com/nodejs/io.js/issues/1538 PR-URL: https://github.com/nodejs/io.js/pull/1731 Reviewed-By: Roman Reiss <me@silverwind.io>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/url.markdown8
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/api/url.markdown b/doc/api/url.markdown
index d2e9611e3c..bc54bee360 100644
--- a/doc/api/url.markdown
+++ b/doc/api/url.markdown
@@ -41,7 +41,8 @@ string will not be in the parsed object. Examples are shown for the URL
Example: `'8080'`
* `pathname`: The path section of the URL, that comes after the host and
- before the query, including the initial slash if present.
+ before the query, including the initial slash if present. No decoding is
+ performed.
Example: `'/p/a/t/h'`
@@ -50,7 +51,7 @@ string will not be in the parsed object. Examples are shown for the URL
Example: `'?query=string'`
-* `path`: Concatenation of `pathname` and `search`.
+* `path`: Concatenation of `pathname` and `search`. No decoding is performed.
Example: `'/p/a/t/h?query=string'`
@@ -72,7 +73,8 @@ Take a URL string, and return an object.
Pass `true` as the second argument to also parse the query string using the
`querystring` module. If `true` then the `query` property will always be
assigned an object, and the `search` property will always be a (possibly
-empty) string. Defaults to `false`.
+empty) string. If `false` then the `query` property will not be parsed or
+decoded. Defaults to `false`.
Pass `true` as the third argument to treat `//foo/bar` as
`{ host: 'foo', pathname: '/bar' }` rather than