aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-08-22 23:27:37 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-08-25 03:08:28 +0800
commitf2c79aa8f48fd04c7ce65d7dfdb6c85948ae448c (patch)
tree13a887792c0a7cc54092a6f936a5f3807027655f
parentc4f35ce753df1c1c4cafc73070abc053090a7ba3 (diff)
downloadgsoc2013-evolution-f2c79aa8f48fd04c7ce65d7dfdb6c85948ae448c.tar
gsoc2013-evolution-f2c79aa8f48fd04c7ce65d7dfdb6c85948ae448c.tar.gz
gsoc2013-evolution-f2c79aa8f48fd04c7ce65d7dfdb6c85948ae448c.tar.bz2
gsoc2013-evolution-f2c79aa8f48fd04c7ce65d7dfdb6c85948ae448c.tar.lz
gsoc2013-evolution-f2c79aa8f48fd04c7ce65d7dfdb6c85948ae448c.tar.xz
gsoc2013-evolution-f2c79aa8f48fd04c7ce65d7dfdb6c85948ae448c.tar.zst
gsoc2013-evolution-f2c79aa8f48fd04c7ce65d7dfdb6c85948ae448c.zip
cal-config-webcal: Accept URIs with webcal:// scheme.
webcal:// is a non-standard URI scheme, but still commonly used. We're using HTTP[S] regardless, so just accept it in the editor.
-rw-r--r--modules/cal-config-webcal/evolution-cal-config-webcal.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/cal-config-webcal/evolution-cal-config-webcal.c b/modules/cal-config-webcal/evolution-cal-config-webcal.c
index 615afaaee4..2ca3550f00 100644
--- a/modules/cal-config-webcal/evolution-cal-config-webcal.c
+++ b/modules/cal-config-webcal/evolution-cal-config-webcal.c
@@ -162,6 +162,7 @@ cal_config_webcal_check_complete (ESourceConfigBackend *backend,
GtkEntry *entry;
Context *context;
const gchar *uri_string;
+ const gchar *scheme;
const gchar *uid;
gboolean complete;
@@ -173,6 +174,13 @@ cal_config_webcal_check_complete (ESourceConfigBackend *backend,
uri_string = gtk_entry_get_text (entry);
soup_uri = soup_uri_new (uri_string);
+
+ /* XXX webcal:// is a non-standard scheme, but we accept it.
+ * Just convert it to http:// for the URI validity test. */
+ scheme = soup_uri_get_scheme (soup_uri);
+ if (g_strcmp0 (scheme, "webcal") == 0)
+ soup_uri_set_scheme (soup_uri, SOUP_URI_SCHEME_HTTP);
+
complete = SOUP_URI_VALID_FOR_HTTP (soup_uri);
if (soup_uri != NULL)