Carddav: decode urlcompname before search to retrieve contacts with & in url

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1879 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2012-01-17 23:08:03 +00:00
parent b8fc24574f
commit 453874e9ff
1 changed files with 2 additions and 1 deletions

View File

@ -2213,7 +2213,8 @@ public class DavExchangeSession extends ExchangeSession {
String urlcompname = getPropertyIfExists(responses[0].getProperties(HttpStatus.SC_OK), "urlcompname");
if ("urn:content-classes:person".equals(contentClass)) {
// retrieve Contact properties
List<ExchangeSession.Contact> contacts = searchContacts(folderPath, CONTACT_ATTRIBUTES, isEqualTo("urlcompname", urlcompname), 1);
List<ExchangeSession.Contact> contacts = searchContacts(folderPath, CONTACT_ATTRIBUTES,
isEqualTo("urlcompname", StringUtil.decodeUrlcompname(urlcompname)), 1);
if (contacts.isEmpty()) {
LOGGER.warn("Item found, but unable to build contact");
throw new HttpNotFoundException(itemPath + " not found");