To change to URI of the webview does not work if the page contains a frame
with a URI to a host that will be changed to https for the HSTS. In this case
the frame URI is used as page URL, so that the user does not see the page he
requested.
Instead the URI of the webframe should be changed. Thanks to Sébastien Marie
for pointing this out.
/* change uri for known and valid hsts hosts */
uri = hsts_get_changed_uri(vb.session, msg);
if (uri) {
- webkit_web_view_load_uri(view, uri);
+ webkit_web_frame_load_uri(frame, uri);
webkit_web_policy_decision_ignore(policy);
g_free(uri);