--- surf.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/surf.c b/surf.c index d48fbc9..28f236a 100644 --- a/surf.c +++ b/surf.c _AT_@ -1618,6 +1618,8 @@ decidenavigation(WebKitPolicyDecision *d, Client *c) WebKitNavigationAction *a = webkit_navigation_policy_decision_get_navigation_action( WEBKIT_NAVIGATION_POLICY_DECISION(d)); + WebKitURIRequest *r; + SoupMessageHeaders *h; switch (webkit_navigation_action_get_navigation_type(a)) { case WEBKIT_NAVIGATION_TYPE_LINK_CLICKED: /* fallthrough */ _AT_@ -1632,6 +1634,14 @@ decidenavigation(WebKitPolicyDecision *d, Client *c) WEBKIT_NAVIGATION_POLICY_DECISION(d))) { webkit_policy_decision_ignore(d); } else { + r = webkit_navigation_action_get_request(a); + h = webkit_uri_request_get_http_headers(r); + if (h && soup_message_headers_get_one(h, "Referer")) { + soup_message_headers_remove(h, "Referer"); + webkit_web_view_load_request(c->view, r); + webkit_policy_decision_ignore(d); + break; + } /* Filter out navigation to different domain ? */ /* get action→urirequest, copy and load in new window+view * on Ctrl+Click ? */ -- 2.19.1Received on Sun Nov 18 2018 - 20:59:01 CET
This archive was generated by hypermail 2.3.0 : Sun Nov 18 2018 - 21:00:26 CET