From 4d36bd9ea987e20bb7cac93bb53df20225c4642d Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Fri, 28 Nov 2014 09:18:59 +0100 Subject: [PATCH] Change URI of webframe instead of webview (#146). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.20.1