mirror of
https://github.com/moparisthebest/davmail
synced 2024-08-13 16:53:51 -04:00
URI encode alias in getEmail()
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@509 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
e9dc9eb6b0
commit
5f1d2e2b01
@ -1744,7 +1744,8 @@ public class ExchangeSession {
|
||||
public String getEmail(String alias) throws IOException {
|
||||
String emailResult = null;
|
||||
if (alias != null) {
|
||||
GetMethod getMethod = new GetMethod("/public/?Cmd=galfind&AN=" + alias);
|
||||
String path = "/public/?Cmd=galfind&AN=" + URIUtil.encodeWithinQuery(alias);
|
||||
GetMethod getMethod = new GetMethod(path);
|
||||
try {
|
||||
int status = httpClient.executeMethod(getMethod);
|
||||
if (status != HttpStatus.SC_OK) {
|
||||
@ -1755,7 +1756,8 @@ public class ExchangeSession {
|
||||
if (result != null) {
|
||||
emailResult = result.get("EM");
|
||||
}
|
||||
|
||||
} catch (HttpException e) {
|
||||
LOGGER.debug("GET " + path+" failed: "+e);
|
||||
} finally {
|
||||
getMethod.releaseConnection();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user