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 <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
  • Loading branch information
fansworld-claudio authored and rvagg committed Dec 8, 2015
1 parent b3f3b2e commit 634c5f1
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 634c5f1

Please sign in to comment.