Caldav: Experimental, add calendar-proxy DAV option and version in server header

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@648 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-08-06 07:39:57 +00:00
parent 09790fc84e
commit b86da04306
1 changed files with 4 additions and 2 deletions

View File

@ -21,6 +21,7 @@ package davmail.caldav;
import davmail.AbstractConnection;
import davmail.BundleMessage;
import davmail.Settings;
import davmail.DavGateway;
import davmail.exception.DavMailAuthenticationException;
import davmail.exception.DavMailException;
import davmail.exchange.ExchangeSession;
@ -933,8 +934,9 @@ public class CaldavConnection extends AbstractConnection {
*/
public void sendHttpResponse(int status, Map<String, String> headers, String contentType, byte[] content, boolean keepAlive) throws IOException {
sendClient("HTTP/1.1 " + status + ' ' + HttpStatus.getStatusText(status));
sendClient("Server: DavMail Gateway");
sendClient("DAV: 1, calendar-access, calendar-schedule, calendarserver-private-events");
String version = DavGateway.getCurrentVersion();
sendClient("Server: DavMail Gateway "+ (version==null?"":version));
sendClient("DAV: 1, calendar-access, calendar-schedule, calendarserver-private-events, calendar-proxy");
SimpleDateFormat formatter = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z", Locale.ENGLISH);
String now = formatter.format(new Date());
sendClient("Date: " + now);