From f2c79aa8f48fd04c7ce65d7dfdb6c85948ae448c Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 22 Aug 2012 11:27:37 -0400 Subject: 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. --- modules/cal-config-webcal/evolution-cal-config-webcal.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules/cal-config-webcal') 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) -- cgit v1.2.3