mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 09:21:49 -05:00
Caldav: updated caldav response headers according to gmail, added Expires and Cache-control HTTP headers
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@622 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
c91862b4a8
commit
66415562ed
@ -728,9 +728,12 @@ 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, 2, 3, access-control, calendar-access, ticket, calendar-schedule, calendarserver-private-events");
|
||||
sendClient("DAV: 1, calendar-access, calendar-schedule, calendarserver-private-events");
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z", Locale.ENGLISH);
|
||||
sendClient("Date: " + formatter.format(new Date()));
|
||||
String now = formatter.format(new Date());
|
||||
sendClient("Date: " + now);
|
||||
sendClient("Expires: " + now);
|
||||
sendClient("Cache-Control: private, max-age=0");
|
||||
if (headers != null) {
|
||||
for (Map.Entry<String, String> header : headers.entrySet()) {
|
||||
sendClient(header.getKey() + ": " + header.getValue());
|
||||
|
Loading…
x
Reference in New Issue
Block a user