Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit abe4528

Browse filesBrowse files
fansworld-claudioMyles Borins
authored andcommitted
doc: url.format - true slash postfix behaviour
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>
1 parent 90498e2 commit abe4528
Copy full SHA for abe4528

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎doc/api/url.markdown‎

Copy file name to clipboardExpand all lines: doc/api/url.markdown
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ Here's how the formatting process works:
8787
* `path` will be ignored.
8888
* `protocol` is treated the same with or without the trailing `:` (colon).
8989
* The protocols `http`, `https`, `ftp`, `gopher`, `file` will be
90-
postfixed with `://` (colon-slash-slash).
90+
postfixed with `://` (colon-slash-slash) as long as `host`/`hostname` are present.
9191
* All other protocols `mailto`, `xmpp`, `aim`, `sftp`, `foo`, etc will
9292
be postfixed with `:` (colon).
9393
* `slashes` set to `true` if the protocol requires `://` (colon-slash-slash)
9494
* Only needs to be set for protocols not previously listed as requiring
95-
slashes, such as `mongodb://localhost:8000/`.
95+
slashes, such as `mongodb://localhost:8000/`, or if `host`/`hostname` are absent.
9696
* `auth` will be used if present.
9797
* `hostname` will only be used if `host` is absent.
9898
* `port` will only be used if `host` is absent.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.