Bug 136889

Summary: [GTK] WebKitWebView::load-failed-with-tls-errors should receive the failing URI instead of a host
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: gustavo, mcatanzaro, svillar
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch gustavo: review+

Description Carlos Garcia Campos 2014-09-17 08:21:42 PDT
We were passing a host for two different reasons, first because it's more convenient to add an exception with webkit_web_context_allow_tls_certificate_for_host(), but also because we were assuming the active URI is the failing URI in case of failure. This assumption is correct because our current code does that, but I'm not sure we are doing it on purpose. That behaviour is not documented anywhere (see http://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebView.html#webkit-web-view-get-uri), it's not what WebKit2 does internaly (see https://bugs.webkit.org/show_bug.cgi?id=136526#c2) and it's not even what epiphany assumes (see https://git.gnome.org/browse/epiphany/tree/embed/ephy-web-view.c?id=3.13.91#n1986). WebKitWebView::load-failed passes the failing URI as parameter, that wouldn't be needed if the active URI was the failing URI. 
This API has already been changed in this cycle and it's considered to be new in 2.6, so this new change is not a problem.
Comment 1 Carlos Garcia Campos 2014-09-17 08:29:42 PDT
Created attachment 238253 [details]
Patch
Comment 2 Carlos Garcia Campos 2014-09-17 09:11:29 PDT
Committed r173691: <http://trac.webkit.org/changeset/173691>