From: Daniel Carl Date: Fri, 28 Nov 2014 08:18:59 +0000 (+0100) Subject: Change URI of webframe instead of webview (#146). X-Git-Url: https://git.owens.tech/rss.xml/rss.xml/git?a=commitdiff_plain;h=4d36bd9ea987e20bb7cac93bb53df20225c4642d;p=vimb.git Change URI of webframe instead of webview (#146). 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. --- diff --git a/src/main.c b/src/main.c index 6c9d90e..7a4d5d4 100644 --- a/src/main.c +++ b/src/main.c @@ -1216,7 +1216,7 @@ static gboolean navigation_decision_requested_cb(WebKitWebView *view, /* 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);