Favicon support
Lee Willis <[email protected]>
| Newsgroups | gmane.comp.web.galeon.devel |
|---|---|
| Message-ID | <[email protected]> |
I was going to raise this through bugzilla, but it appears to be down so
here we go ...
I've noticed that favicon support in galeon2 is less than ideal
(IMHO). The attached patch seems to make it more intuitive for me in a
lot of cases, but I know it has issues:
The patch does two things:
(1) Treats HTTPS URIs as HTTP for the purpose of favicon matching
(2) Recurses up the URI until it reaches the hostname to work out
whether a favicon is available, ie http://www.foo.com/dir1/page2.htm
will use the favicon for http://www.foo.com
The problems I know we have are:
(1) 1 is a bodge
(2) I don't think this (2) delivers the "Standard behaviour" but it works
for most sites better than the shipped behaviour
(3) We don't support simply having www.url.here/favicon.ico present as
far as I can tell.
Any thoughts?
Lee
--
| Lee Willis Unmetered & ADSL solutions
| Products and Services Development Co-ordinator for Home & Business
| PlusNet Technologies Ltd. @ http://www.plus.net
+------------ My Referrals - It pays to recommend PlusNet --------------
galeonfavicon.patch
(text/x-patch, 702 B)
@@ -361,16 +368,32 @@
char *
galeon_favicon_cache_url (const char *url)
{
- GnomeVFSURI *uri;
+ GnomeVFSURI *uri, *temp_uri = NULL;
char *result, *clean_url;
int clean_url_len;
if (url == NULL)
return NULL;
- uri = gnome_vfs_uri_new (url);
+ if (!strncmp(url, "https://",8))
+ {
+ result = g_strdup(url);
+ strcpy(&result[4],&url[5]);
+ } else {
+ result = strdup(url);
+ }
+
+ uri = gnome_vfs_uri_new (result);
+
if (uri == NULL)
return NULL;
+
+ while (gnome_vfs_uri_has_parent(uri))
+ {
+ temp_uri = gnome_vfs_uri_get_parent(uri);
+ gnome_vfs_uri_unref (uri);
+ uri=temp_uri;
+ }
clean_url = gnome_vfs_uri_to_string (uri,
GNOME_VFS_URI_HIDE_USER_NAME |