Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit fc01794f authored by Kenny Root's avatar Kenny Root Committed by Jean-Baptiste Queru
Browse files

Make Uri.parseUserPart, parseHost, and parsePort symmetric

Currently parseUserPart uses the encoded authority to split the URI
into user and non-user parts, but the parseHost and parsePort uses
the decoded URI to split the URI into non-host, host, and port parts.
This gives unexpected results when %40 ('@') and %3a (':') is used
in a URI:

Uri test = Uri.parse("http://bob%40lee%3ajr@example.com:42/");
test.getUserInfo() => "bob@lee:jr"
test.getHost() => "lee:jr@example.com" (should be "example.com")
test.getPort() => -1 (should be 42)
parent f9d9cf1e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment