diff options
author | Bastien Nocera <hadess@hadess.net> | 2013-07-08 17:33:02 +0800 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2013-07-12 20:10:15 +0800 |
commit | 442fba3349081b17f317de2c1d702c6fe6496e2a (patch) | |
tree | 22811d9ecf4d8f29bb4cbf628361a427fea710f4 /lib | |
parent | 18d58e526c4f53176ef66d2e42df35ec2c8bab29 (diff) | |
download | gsoc2013-epiphany-442fba3349081b17f317de2c1d702c6fe6496e2a.tar gsoc2013-epiphany-442fba3349081b17f317de2c1d702c6fe6496e2a.tar.gz gsoc2013-epiphany-442fba3349081b17f317de2c1d702c6fe6496e2a.tar.bz2 gsoc2013-epiphany-442fba3349081b17f317de2c1d702c6fe6496e2a.tar.lz gsoc2013-epiphany-442fba3349081b17f317de2c1d702c6fe6496e2a.tar.xz gsoc2013-epiphany-442fba3349081b17f317de2c1d702c6fe6496e2a.tar.zst gsoc2013-epiphany-442fba3349081b17f317de2c1d702c6fe6496e2a.zip |
ephy-string: Avoid poking at remote websites
Epiphany tries to query the existence of remote sites before loading
their page. This causes problems when the remote site is not available
and loading it requires the query to timeout (epiphany would look like
it's not loading the site for up to 60 seconds) or for one-time URLs
(where it might invalidate the query, such as for password resets, or
confirmation e-mails).
We'll now only check whether the file exists so that incomplete URLs
("epiphany foo.com/bar.html") still loads the bar.html file if it exists
locally, but the remote website if not.
https://bugzilla.gnome.org/show_bug.cgi?id=703772
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ephy-string.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ephy-string.c b/lib/ephy-string.c index 54b83125f..47d8f5ac1 100644 --- a/lib/ephy-string.c +++ b/lib/ephy-string.c @@ -493,7 +493,7 @@ ephy_string_expand_initial_tilde (const char *path) * ephy_string_commandline_args_to_uris: * @arguments: a %NULL-terminated array of chars. * - * Transform commandline arguments to URIs if they exist, + * Transform commandline arguments to URIs if they are native, * otherwise simply transform them to UTF-8. * * Returns: a newly allocated array with the URIs and @@ -513,7 +513,7 @@ ephy_string_commandline_args_to_uris (char **arguments, GError **error) for (i = 0; arguments[i] != NULL; ++i) { file = g_file_new_for_commandline_arg (arguments [i]); - if (g_file_query_exists (file, NULL)) { + if (g_file_is_native (file) && g_file_query_exists (file, NULL)) { args[i] = g_file_get_uri (file); } else { args[i] = g_locale_to_utf8 (arguments [i], -1, |