ubuntu-webapps-bugs team mailing list archive
-
ubuntu-webapps-bugs team
-
Mailing list archive
-
Message #02641
[Bug 1415662] Re: Cancelling a request in onBeforeRedirect doesn't actually do anything
** Changed in: oxide
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Ubuntu
WebApps bug tracking, which is subscribed to Oxide.
https://bugs.launchpad.net/bugs/1415662
Title:
Cancelling a request in onBeforeRedirect doesn't actually do anything
Status in Oxide Webview:
Fix Released
Bug description:
I'm looking at bug 1399195 - the onBeforeRedirect test cancels the
request in one case, but then never verifies that the request is
actually cancelled. Having tried it, it turns out that this just
doesn't work at all.
The issue is that the callback hangs off
NetworkDelegate::OnBeforeRedirect(), which is called from
net::URLRequest::Redirect(). If the application wants to prevent the
redirect, Oxide calls net::URLRequet::Cancel(), but it's too late to
do this and as soon as we return from
NetworkDelegate::OnBeforeRedirect, Chromium restarts the request with
the new URL.
To do this, we need to implement a ResourceThrottle, and call in to
the application on ResourceThrottle::WillRedirectRequest. This is
called much earlier than the NetworkDelegate callback, and gives us an
opportunity to actually cancel the request properly.
To manage notifications about this bug go to:
https://bugs.launchpad.net/oxide/+bug/1415662/+subscriptions
References