1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-14 19:52:21 -05:00

Carddav: encode photo href

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1207 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-07-19 15:42:25 +00:00
parent d1278edad4
commit 7419375ab7

View File

@ -1227,7 +1227,7 @@ public class DavExchangeSession extends ExchangeSession {
public ExchangeSession.ContactPhoto getContactPhoto(ExchangeSession.Contact contact) throws IOException { public ExchangeSession.ContactPhoto getContactPhoto(ExchangeSession.Contact contact) throws IOException {
ContactPhoto contactPhoto = null; ContactPhoto contactPhoto = null;
if ("true".equals(contact.get("haspicture"))) { if ("true".equals(contact.get("haspicture"))) {
final GetMethod method = new GetMethod(contact.getHref() + "/ContactPicture.jpg"); final GetMethod method = new GetMethod(URIUtil.encodePath(contact.getHref()) + "/ContactPicture.jpg");
method.setRequestHeader("Translate", "f"); method.setRequestHeader("Translate", "f");
method.setRequestHeader("Accept-Encoding", "gzip"); method.setRequestHeader("Accept-Encoding", "gzip");