Fix NullpointerException with CAS single signon form

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@404 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-02-27 11:45:38 +00:00
parent 92809cdde9
commit eb1187e5ea
1 changed files with 8 additions and 5 deletions

View File

@ -147,16 +147,19 @@ public class ExchangeSession {
}
protected String getAbsolutePath(HttpMethod method, String path) {
String absolutePath = path;
// allow relative path
if (!absolutePath.startsWith("/")) {
if (path == null) {
return method.getPath();
} else if (path.startsWith("/")) {
return path;
} else {
String currentPath = method.getPath();
int end = currentPath.lastIndexOf('/');
if (end >= 0) {
absolutePath = currentPath.substring(0, end + 1) + absolutePath;
return currentPath.substring(0, end + 1) + path;
} else {
return path;
}
}
return absolutePath;
}
/**