aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2002-08-19 21:28:10 +0800
committerDan Winship <danw@src.gnome.org>2002-08-19 21:28:10 +0800
commite851cec11e3556ae42ecd160f61b661b808d013c (patch)
tree918caf217a634deeba4645516ae756b526d596e1
parent362583b764392a1b672a0404d85932853de5afab (diff)
downloadgsoc2013-evolution-e851cec11e3556ae42ecd160f61b661b808d013c.tar.gz
gsoc2013-evolution-e851cec11e3556ae42ecd160f61b661b808d013c.tar.zst
gsoc2013-evolution-e851cec11e3556ae42ecd160f61b661b808d013c.zip
If the passed-in URL contains a path, but the service doesn't allow paths,
* camel-session.c (get_service): If the passed-in URL contains a path, but the service doesn't allow paths, then the path part must be a folder name, and we should ignore it here. #29010 svn path=/trunk/; revision=17797
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/camel-session.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index a4ae451a6e..e4c14b822f 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+2002-08-16 Dan Winship <danw@ximian.com>
+
+ * camel-session.c (get_service): If the passed-in URL contains a
+ path, but the service doesn't allow paths, then the path part must
+ be a folder name, and we should ignore it here. #29010
+
2002-08-16 Chris Toshok <toshok@ximian.com>
* camel-arg.h: remove the outer parens from the expansion of
diff --git a/camel/camel-session.c b/camel/camel-session.c
index 4e74c1bd9e..4a93534d6f 100644
--- a/camel/camel-session.c
+++ b/camel/camel-session.c
@@ -425,6 +425,12 @@ get_service (CamelSession *session, const char *url_string,
return NULL;
}
+ /* If the provider doesn't use paths but the URL contains one,
+ * ignore it.
+ */
+ if (url->path && !CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_PATH))
+ camel_url_set_path (url, NULL);
+
/* Now look up the service in the provider's cache */
service = g_hash_table_lookup (provider->service_cache[type], url);
if (service != NULL) {