WebView not support modify request
Reported by
atua...@gmail.com,
Jun 20 2017
|
|||||
Issue description
Steps to reproduce the problem:
1. user click the link of page, and visit
2. browser core will have some callback, e.g.
boolean shouldOverrideUrlLoading (WebView view,
WebResourceRequest request)
WebResourceResponse shouldInterceptRequest (WebView view,
WebResourceRequest request)
3. but no interface can modify request and continue loading from network
What is the expected behavior?
can we add one interface to support modify request header in android webview?
e.g.
WebResourceRequest shouldModifyRequest (WebView view,
WebResourceRequest request)
What went wrong?
business logic always in browser shell, only shell knows when and how it should modify the request header. this is very important for browser based on webview.
Did this work before? N/A
Does this work in other browsers? N/A
Chrome version: 55.0.2883.87 Channel: n/a
OS Version:
Flash Version: Shockwave Flash 26.0 r0
ios can modify request before request send. e.g. https://www.raywenderlich.com/59982/nsurlprotocol-tutorial
,
Jun 23 2017
Thanks; we're looking at extending the API to support modifying request headers and other more complex network capabilities in a future android release. Is modifying the request headers the only thing you need to be able to do? We're trying to collect use cases to inform our design currently.
,
Jun 23 2017
,
Jun 27 2017
Good! Some other ability also is important, for example, add/update/delete httpcache in android webview. can you share your public design document link?
,
Jun 27 2017
and modify url also is very import, for example, add some parameters in url before send request.
,
Jun 27 2017
it should have most abilities of NSURLProtocol of iOS.
,
Jun 27 2017
What do you mean by "add/update/delete httpcache"? That doesn't seem related to network requests. We're still working on the design and don't have anything to share yet.
,
Jun 29 2017
yes, "add/update/delete httpcache" is not related to network requests. it relates to extend ablity of WebView.
,
Jun 29 2018
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jul 4
We'll handle request modification in issue 860115. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by ksakamoto@chromium.org
, Jun 23 2017