diff options
author | Adam Vartanian <flooey@google.com> | 2019-02-18 12:01:11 +0000 |
---|---|---|
committer | Adam Vartanian <flooey@google.com> | 2019-02-19 09:27:24 +0000 |
commit | f240cb809173afe453c5d8982477ef22166dbc60 (patch) | |
tree | aa1622c3ea393f1cd2286c6b393123171f4af688 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java | |
parent | 762f9f0c2449ce8f12c87de0eb6bcd32b6548029 (diff) |
Fix authority parsing test
The test has been failing because http://r.android.com/793302 changed
how the port separator was found, only scanning ASCII digits until it
hits a colon, and previously it would scan for the colon and then
percent-decode the rest of it. The new behavior actually better
matches the WHATWG URL parsing algorithm [1], which specifies that
ports only include ASCII digits. It does mean that some edge cases
that previously parsed as host "foo", port 42 will now parse as
host "foo:42", no port, but those URLs wouldn't be accepted by
browsers so they should be exceedingly rare.
The behavior per the WHATWG spec would be to fail to parse in the case
of a percent-encoded character in the port section, but this class is
specifically documented to accept garbage, so lumping the mis-encoded
port as part of the hostname (which will result in a hostname that's
invalid and impossible to resolve) seems like the best option.
[1] https://url.spec.whatwg.org/#port-state
Fixes: 124360078
Test: atest android.net.UriTest
Change-Id: I1c788cb7703c821ae74b542b74d89e10cba5a546
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions