eb8be973c7982fe3ece0aeaeca379c3b3cdced0c |
|
12-Oct-2010 |
Bjorn Bringert <bringert@android.com> |
Make fields in WebAddress private, add getters/setters Change-Id: Iceaf3d648289344e53c37273f7324a79676fbef7
/frameworks/base/core/tests/coretests/src/android/net/WebAddressTest.java
|
8bb37f7ffb24ab06576dd4225ab0a5e1828a0d07 |
|
07-Sep-2010 |
Steve Block <steveblock@google.com> |
Adds a test case for WebAddress where the path component does not have a leading slash When a URL is malformed because the path does not start with a slash, we assume that the path starts with the first character that is not valid in the host and insert a leading slash. This is the reason why the regex for the path component does not force a leading slash. Bug: 1011602 Change-Id: I8efe46c058d2ee2d1a6a4406ee25dc021315222b
/frameworks/base/core/tests/coretests/src/android/net/WebAddressTest.java
|
582deec1f3c8f51b431bb2ad685c9217ffd9eaad |
|
06-Sep-2010 |
Steve Block <steveblock@google.com> |
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
/frameworks/base/core/tests/coretests/src/android/net/WebAddressTest.java
|