aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-history.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@src.gnome.org>2007-12-25 07:48:02 +0800
committerCosimo Cecchi <cosimoc@src.gnome.org>2007-12-25 07:48:02 +0800
commit826724c278a218d528d254ca5631267a83c5a48f (patch)
tree3091a313d89c79152a37de9685c73fac720aa909 /embed/ephy-history.c
parent4b350bc5522d5040998ac09271c9318549ff4d07 (diff)
downloadgsoc2013-epiphany-826724c278a218d528d254ca5631267a83c5a48f.tar
gsoc2013-epiphany-826724c278a218d528d254ca5631267a83c5a48f.tar.gz
gsoc2013-epiphany-826724c278a218d528d254ca5631267a83c5a48f.tar.bz2
gsoc2013-epiphany-826724c278a218d528d254ca5631267a83c5a48f.tar.lz
gsoc2013-epiphany-826724c278a218d528d254ca5631267a83c5a48f.tar.xz
gsoc2013-epiphany-826724c278a218d528d254ca5631267a83c5a48f.tar.zst
gsoc2013-epiphany-826724c278a218d528d254ca5631267a83c5a48f.zip
Display a single host entry in the History Window also when the same host
is visited with different protocols (http and https). Fix bug #313481. svn path=/trunk/; revision=7818
Diffstat (limited to 'embed/ephy-history.c')
-rw-r--r--embed/ephy-history.c31
1 files changed, 21 insertions, 10 deletions
diff --git a/embed/ephy-history.c b/embed/ephy-history.c
index 57f4bc0ca..f7fdcc669 100644
--- a/embed/ephy-history.c
+++ b/embed/ephy-history.c
@@ -699,23 +699,34 @@ internal_get_host (EphyHistory *eh, const char *url, gboolean create)
{
char *location;
char *tmp;
+
+ if (g_str_equal (scheme, "https"))
+ {
+ /* If scheme is https, we still fake http. */
+ location = g_strconcat ("http://", host_name, "/", NULL);
+ host_locations = g_list_append (host_locations, location);
+ }
+ /* We append the real address */
location = g_strconcat (scheme,
"://", host_name, "/", NULL);
host_locations = g_list_append (host_locations, location);
- if (g_str_has_prefix (host_name, "www."))
+ /* and also a fake www-modified address if it's http or https. */
+ if (g_str_has_prefix (scheme, "http"))
{
- tmp = g_strdup (g_utf8_offset_to_pointer (host_name, 4));
- }
- else
- {
- tmp = g_strconcat ("www.", host_name, NULL);
+ if (g_str_has_prefix (host_name, "www."))
+ {
+ tmp = g_strdup (host_name + 4);
+ }
+ else
+ {
+ tmp = g_strconcat ("www.", host_name, NULL);
+ }
+ location = g_strconcat ("http://", tmp, "/", NULL);
+ g_free (tmp);
+ host_locations = g_list_append (host_locations, location);
}
- location = g_strconcat (gnome_vfs_uri_get_scheme (vfs_uri),
- "://", tmp, "/", NULL);
- g_free (tmp);
- host_locations = g_list_append (host_locations, location);
}
g_return_val_if_fail (host_locations != NULL, NULL);