--
You received this message because you are subscribed to the Google Groups "android-webview-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-webview...@chromium.org.
To post to this group, send email to android-w...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/android-webview-dev/2ec93741-1f48-427e-8057-9d4d618db2c4%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/android-webview-dev/DFD063C4-7BCE-4D0F-A849-64924AD8CD26%40gmail.com.
ShouldInterceptRequest never supported observing and monitoring all webview traffic, i.e. websockets and serviceworkers are two examples I think.
On Tue, Apr 5, 2016 at 9:19 AM, Pavel Zdeněk <pavel....@gmail.com> wrote:
Hi all,i am trying to completely observe and possibly manipulate a WebView traffic. For potential other amphibious devs here, getting as close to iOS NSURLProtocol as possible. So i hooked on WebViewClient.shouldInterceptRequest and started with just logging and returning null to everything - which "will continue to load the resource as usual". I am getting all resource loads, images, stylesheets, subframes this way, EXCEPT when a request is a redirection. 302 specifically in my testing case, but other kinds of redirects would behave the same i believe. shouldInterceptRequest is never called with the actual redirection target. So i could not even know where it redirected to. I can, because onPageStarted is called as expected - only it's read-only void event handler, obviously incapable of what i would like to do in shouldInterceptRequest.Pseudo event log if URL "A" gives plain 200 response:1. shouldIntercept A2. server: A -> 2003. onPageStarted Aif URL "A" redirects to "B" which responds normally1. shouldIntercept A2. server: A -> 3023. onPageStarted A4. server: B -> 2005. onPageStarted BshouldIntercept for B is missing. It looks like returning null in shouldInterceptRequest means giving up control over the whole http stream (until closed), not just the one request which it originally was called with and replied to.Can someone confirm this? Is it by design or can it be considered a bug?Regards,Pavel
--
You received this message because you are subscribed to the Google Groups "android-webview-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-webview-dev+unsub...@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to android-webview...@chromium.org.
To post to this group, send email to android-w...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/android-webview-dev/2ec93741-1f48-427e-8057-9d4d618db2c4%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "android-webview-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-webview...@chromium.org.
To post to this group, send email to android-w...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/android-webview-dev/4cec0d41-1206-4856-9c3a-f074fd6a8dc4%40chromium.org.