Caldav: fix bug 2896135, iCal login fails at iCal startup
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@895 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
f4f472ed27
commit
3f22413dda
|
@ -996,6 +996,7 @@ 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));
|
||||
if (status != HttpStatus.SC_UNAUTHORIZED) {
|
||||
String version = DavGateway.getCurrentVersion();
|
||||
sendClient("Server: DavMail Gateway " + (version == null ? "" : version));
|
||||
sendClient("DAV: 1, calendar-access, calendar-schedule, calendarserver-private-events");
|
||||
|
@ -1006,6 +1007,7 @@ public class CaldavConnection extends AbstractConnection {
|
|||
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…
Reference in New Issue