Closed GoogleCodeExporter closed 9 years ago
Further testing shows the patch fulfills only half of its intended purpose. If
a redirect URL is modified in OnLocationRedirect() it is taken note of only
internally. For example, the subsequent call to OnBeforeBrowse() contains the
modified URL, but the actual request being sent out over the net uses the
initial unmodified URL.
Working on fixing this.
Original comment by yyankov
on 24 Sep 2011 at 2:21
With this new patch changes to redirectUrl are now observed properly. Please
note that this requires a small modification to Chromium itself in
src/net/url_request/url_request.*
The attached patch includes the patch to Chromium, but it is required that you
run gclient runhooks after patching for it to be applied.
Also, note that OnLocationRedirect() will be invoked on the IO thread, not UI.
Original comment by yyankov
on 26 Sep 2011 at 2:20
Attachments:
Thank you for developing a patch with unit tests!
It looks like the "recommended" way to change redirects is by using
URLRequest::Interceptor::MaybeInterceptRedirect(). Did you explore this option?
Original comment by magreenb...@gmail.com
on 27 Sep 2011 at 8:03
Not really, how do you know this is the recommended way? I'm only asking
because, whatever the source you're citing is, it might be useful for further
reference in general.
I was looking for the least invasive way to solve the issue, but if
MaybeInterceptRedirect() is exposed to libcef/browser_resource_loader_bridge in
some way, and it makes possible to avoid patching Chromium, that would indeed
be preferable.
I'll look into it, thanks.
Original comment by yyankov
on 27 Sep 2011 at 8:14
> Not really, how do you know this is the recommended way?
Via inspection of the header file and my general knowledge of Chromium thinking
:-).
Original comment by magreenb...@gmail.com
on 27 Sep 2011 at 8:53
Fixed in revision 419.
Original comment by magreenb...@gmail.com
on 15 Dec 2011 at 4:06
Original issue reported on code.google.com by
yyankov
on 21 Sep 2011 at 4:11