From e851cec11e3556ae42ecd160f61b661b808d013c Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 19 Aug 2002 13:28:10 +0000 Subject: 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 --- camel/ChangeLog | 6 ++++++ camel/camel-session.c | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'camel') 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 + + * 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 * 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) { -- cgit v1.2.3