diff options
| author | 2010-09-06 16:16:39 +0100 | |
|---|---|---|
| committer | 2010-09-07 13:22:23 +0100 | |
| commit | 582deec1f3c8f51b431bb2ad685c9217ffd9eaad (patch) | |
| tree | c88f58b0df2ca056d4f2f90ba97eb1d1808de607 /libs/hwui/GradientCache.cpp | |
| parent | 3a47e9524aba5fa3bc27932a42a995bc36a0bdbd (diff) | |
Fixes a problem with URL parsing when the host ends with a dot
The WebAddress class provides a lenient parser for URLs. Currently, it
identifies the host portion with the regex [<chars>]+(\.[<chars>]+)* where
<chars> is the set of characters valid for the host name. This pattern excludes
the case where the host ends with a dot, which is valid possibility. As a
result, any trailing dot is pushed into the path component. Since we add a
leading slash to the path if one is missing, the result is a path that begins
with '/.'.
This fix changes the host regex to [<chars>]+[<chars>\.]* which allows trailing
dots and fixes the problem.
Bug: 2337042
Change-Id: I310512531787e0f742988f5d815ad944fd39e059
Diffstat (limited to 'libs/hwui/GradientCache.cpp')
0 files changed, 0 insertions, 0 deletions