-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This fixes two issues. 1) Use the URI constructor with multiple arguments to construct the placeholder URI for direct address, so that special characters can be correctly escaped. This resolves #1883. It requires the second fix. 2) Stop URI from mistreating paths as authorities. There is a bug in URI constructors that take multiple arguments. They simply concatenate escaped components and try to parse the resulting string. For example, URI("dns", null, "//127.0.0.1", null), which is what we do internally when the application passes "/127.0.0.1" as the target, is supposed to create a [scheme="dns", path="//127.0.0.1"]. Instead, it internally composes "dns://127.0.0.1", which is parsed into [scheme="dns", authority="127.0.0.1"]. To avoid this issue, we pass empty string instead of null as the authority to the URI constructor. The constructor would make "dns:////127.0.0.1" internally which can be parsed correctly.
- Loading branch information
1 parent
d25b65b
commit 631a9d5
Showing
3 changed files
with
41 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters