mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 11:12:22 -05:00
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:
parent
09790fc84e
commit
b86da04306
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user