1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-13 03:02:22 -05:00

CaldavConnection cleanup

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@182 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2008-11-29 14:27:33 +00:00
parent 6e384ae98a
commit 3e43112754

View File

@ -4,20 +4,22 @@ import davmail.AbstractConnection;
import davmail.Settings;
import davmail.exchange.ExchangeSession;
import davmail.exchange.ExchangeSessionFactory;
import davmail.exchange.NetworkDownException;
import davmail.tray.DavGatewayTray;
import org.apache.commons.httpclient.HttpException;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.util.URIUtil;
import javax.xml.stream.*;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.StringReader;
import java.io.BufferedReader;
import java.net.Socket;
import java.net.SocketTimeoutException;
import java.util.*;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* Handle a caldav connection.
@ -163,8 +165,7 @@ public class CaldavConnection extends AbstractConnection {
buffer.append(" </C:calendar-home-set>");
buffer.append(" <C:calendar-user-address-set>\n");
// TODO
buffer.append(" <D:href>mailto:" + session.getEmail() + "</D:href>\n");
buffer.append(" <D:href>mailto:").append(session.getEmail()).append("</D:href>\n");
buffer.append(" </C:calendar-user-address-set>");
buffer.append(" <C:schedule-inbox-URL>\n");
@ -305,7 +306,6 @@ public class CaldavConnection extends AbstractConnection {
}
buffer.append("</D:multistatus>");
// TODO : remove
sendHttpResponse(HttpStatus.SC_MULTI_STATUS, null, "text/xml;charset=UTF-8", buffer.toString(), true);
} else if ("PUT".equals(command) && path.startsWith("/calendar/")) {
String etag = headers.get("if-match");