mirror of
https://github.com/moparisthebest/davmail
synced 2025-03-04 11:19:43 -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.AbstractConnection;
|
||||||
import davmail.BundleMessage;
|
import davmail.BundleMessage;
|
||||||
import davmail.Settings;
|
import davmail.Settings;
|
||||||
|
import davmail.DavGateway;
|
||||||
import davmail.exception.DavMailAuthenticationException;
|
import davmail.exception.DavMailAuthenticationException;
|
||||||
import davmail.exception.DavMailException;
|
import davmail.exception.DavMailException;
|
||||||
import davmail.exchange.ExchangeSession;
|
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 {
|
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("HTTP/1.1 " + status + ' ' + HttpStatus.getStatusText(status));
|
||||||
sendClient("Server: DavMail Gateway");
|
String version = DavGateway.getCurrentVersion();
|
||||||
sendClient("DAV: 1, calendar-access, calendar-schedule, calendarserver-private-events");
|
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);
|
SimpleDateFormat formatter = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z", Locale.ENGLISH);
|
||||||
String now = formatter.format(new Date());
|
String now = formatter.format(new Date());
|
||||||
sendClient("Date: " + now);
|
sendClient("Date: " + now);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user