Skip to content

Commit

Permalink
doc: url.format - true slash postfix behaviour
Browse files Browse the repository at this point in the history
Change url.format's references to slash postfixing to reflect
true behaviour (it only automatically postfixes slashes to the
slashedProtocols when host is present).

Fixes: #3361

PR-URL: #4119
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
  • Loading branch information
fansworld-claudio authored and Myles Borins committed Jan 19, 2016
1 parent 90498e2 commit abe4528
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/url.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ Here's how the formatting process works:
* `path` will be ignored.
* `protocol` is treated the same with or without the trailing `:` (colon).
* The protocols `http`, `https`, `ftp`, `gopher`, `file` will be
postfixed with `://` (colon-slash-slash).
postfixed with `://` (colon-slash-slash) as long as `host`/`hostname` are present.
* All other protocols `mailto`, `xmpp`, `aim`, `sftp`, `foo`, etc will
be postfixed with `:` (colon).
* `slashes` set to `true` if the protocol requires `://` (colon-slash-slash)
* Only needs to be set for protocols not previously listed as requiring
slashes, such as `mongodb://localhost:8000/`.
slashes, such as `mongodb://localhost:8000/`, or if `host`/`hostname` are absent.
* `auth` will be used if present.
* `hostname` will only be used if `host` is absent.
* `port` will only be used if `host` is absent.
Expand Down

0 comments on commit abe4528

Please sign in to comment.