diff options
author | sgurun@chromium.org <sgurun@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-06 07:43:21 +0000 |
---|---|---|
committer | sgurun@chromium.org <sgurun@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-06 07:43:21 +0000 |
commit | e416c6e6e0f7102f44f6a5d997e2c5eea633d2e4 (patch) | |
tree | 6065b2023c09cf21a4cb789fec684b2dd0c4af1e | |
parent | 4a1e819ef2ea392f5c8168875ee6b39ca799c69f (diff) | |
download | chromium_src-e416c6e6e0f7102f44f6a5d997e2c5eea633d2e4.zip chromium_src-e416c6e6e0f7102f44f6a5d997e2c5eea633d2e4.tar.gz chromium_src-e416c6e6e0f7102f44f6a5d997e2c5eea633d2e4.tar.bz2 |
Removing the logic to strip url parameters when accessing content:
schemes. This was historically used by htmlviewer and android stock
browser.
BUG=https://code.google.com/p/android/issues/detail?id=62046
b/11654127
Review URL: https://codereview.chromium.org/105913003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239142 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | android_webview/java/src/org/chromium/android_webview/AndroidProtocolHandler.java | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/android_webview/java/src/org/chromium/android_webview/AndroidProtocolHandler.java b/android_webview/java/src/org/chromium/android_webview/AndroidProtocolHandler.java index 4c7ca07..6ffac8d 100644 --- a/android_webview/java/src/org/chromium/android_webview/AndroidProtocolHandler.java +++ b/android_webview/java/src/org/chromium/android_webview/AndroidProtocolHandler.java @@ -138,11 +138,7 @@ public class AndroidProtocolHandler { private static InputStream openContent(Context context, Uri uri) { assert(uri.getScheme().equals(CONTENT_SCHEME)); try { - // We strip the query parameters before opening the stream to - // ensure that the URL we try to load exactly matches the URL - // we have permission to read. - Uri baseUri = stripQueryParameters(uri); - return context.getContentResolver().openInputStream(baseUri); + return context.getContentResolver().openInputStream(uri); } catch (Exception e) { Log.e(TAG, "Unable to open content URL: " + uri); return null; @@ -206,21 +202,6 @@ public class AndroidProtocolHandler { } /** - * Remove query parameters from a Uri. - * @param uri The input uri. - * @return The given uri without query parameters. - */ - private static Uri stripQueryParameters(Uri uri) { - assert(uri.getAuthority() != null); - assert(uri.getPath() != null); - Uri.Builder builder = new Uri.Builder(); - builder.scheme(uri.getScheme()); - builder.encodedAuthority(uri.getAuthority()); - builder.encodedPath(uri.getPath()); - return builder.build(); - } - - /** * Set the context to be used for resolving resource queries. * @param context Context to be used, or null for the default application * context. |