Bug 32792 - [Gtk] Make WebKitGtk give full URI to soup_session_prepare_for_uri (patch attached)
Summary: [Gtk] Make WebKitGtk give full URI to soup_session_prepare_for_uri (patch att...
Status: RESOLVED DUPLICATE of bug 35589
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-20 08:22 PST by José Millán Soto
Modified: 2010-03-25 05:31 PDT (History)
4 users (show)

See Also:


Attachments
Patch for making soup_session_prepare_for_uri receive full URI (3.66 KB, patch)
2009-12-20 08:23 PST, José Millán Soto
gustavo: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description José Millán Soto 2009-12-20 08:22:35 PST
This patch makes WebKitGtk to give the full URI to soup_session_prepare_for_uri.
If only the host is passed, then there can be errors in proxy resolution (if a PAC file is being used) once patch submitted in https://bugzilla.gnome.org/show_bug.cgi?id=605065 has been commited.
Comment 1 José Millán Soto 2009-12-20 08:23:36 PST
Created attachment 45281 [details]
Patch for making soup_session_prepare_for_uri receive full URI
Comment 2 WebKit Review Bot 2009-12-20 08:27:27 PST
style-queue ran check-webkit-style on attachment 45281 [details] without any errors.
Comment 3 Gustavo Noronha (kov) 2010-01-07 16:50:59 PST
Comment on attachment 45281 [details]
Patch for making soup_session_prepare_for_uri receive full URI

> Index: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
> ===================================================================
> --- WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp	(revision 52416)
> +++ WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp	(working copy)
> @@ -462,6 +462,7 @@ void ChromeClient::mouseDidMoveOverEleme
>      bool isLink = hit.isLiveLink();
>      if (isLink) {
>          KURL url = hit.absoluteLinkURL();
> +        prepareForUri(url);
>          if (!url.isEmpty() && url != m_hoveredLinkURL) {
>              TextDirection dir;
>              CString titleString = hit.title(dir).utf8();

I don't think this is a good solution. If WebCore decides to prefetch DNS in additional situations we'll miss out. I recommend changing the prefetchDNS function to take the full URL, and change all other ports implementations to use the host alone. Should not be too much work, and is much cleaner:

kov@goiaba ~/s/W/WebCore> ack-grep prefetchDNS 
page/Chrome.cpp
330:            prefetchDNS(result.absoluteLinkURL().host());

platform/android/TemporaryLinkStubs.cpp
479:void prefetchDNS(const String&)

platform/network/soup/DNSSoup.cpp
35:void prefetchDNS(const String& hostname)

platform/network/cf/DNSCFNet.cpp
147:void prefetchDNS(const String& hostname)

platform/network/DNS.h
33:    void prefetchDNS(const String& hostname);

platform/network/qt/DnsPrefetchHelper.cpp
27:void prefetchDNS(const String& hostname)

platform/network/chromium/DNSChromium.cpp
33:void prefetchDNS(const String& hostname)
35:    ChromiumBridge::prefetchDNS(hostname);

platform/network/curl/DNSCurl.cpp
33:void prefetchDNS(const String& hostname)

platform/chromium/ChromiumBridge.h
93:        static void prefetchDNS(const String& hostname);

html/HTMLLinkElement.cpp
186:        prefetchDNS(m_url.host());

html/HTMLAnchorElement.cpp
282:                    prefetchDNS(document()->completeURL(parsedURL).host());

wml/WMLAElement.cpp
64:                prefetchDNS(document()->completeURL(value).host());
Comment 4 Xan Lopez 2010-03-25 05:31:40 PDT

*** This bug has been marked as a duplicate of bug 35589 ***