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.
Created attachment 238253 [details] Patch
Committed r173691: <http://trac.webkit.org/changeset/173691>