From 8d63d2d0348a154513022853ca4799ff65163e0d Mon Sep 17 00:00:00 2001 From: mguessan Date: Fri, 13 Nov 2009 21:39:33 +0000 Subject: [PATCH] Caldav: do not close connection on 401 authorization required, may help iCal authentication git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@830 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/caldav/CaldavConnection.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/java/davmail/caldav/CaldavConnection.java b/src/java/davmail/caldav/CaldavConnection.java index 41f691db..ef9117d7 100644 --- a/src/java/davmail/caldav/CaldavConnection.java +++ b/src/java/davmail/caldav/CaldavConnection.java @@ -919,7 +919,7 @@ public class CaldavConnection extends AbstractConnection { public void sendUnauthorized() throws IOException { HashMap headers = new HashMap(); headers.put("WWW-Authenticate", "Basic realm=\"" + BundleMessage.format("UI_DAVMAIL_GATEWAY") + '\"'); - sendHttpResponse(HttpStatus.SC_UNAUTHORIZED, headers, null, (byte[]) null, false); + sendHttpResponse(HttpStatus.SC_UNAUTHORIZED, headers, null, (byte[]) null, true); } /** @@ -1379,7 +1379,6 @@ public class CaldavConnection extends AbstractConnection { */ protected class ChunkedResponse { Writer writer; - String contentType; protected ChunkedResponse(int status, String contentType) throws IOException { writer = new OutputStreamWriter(new BufferedOutputStream(new OutputStream() {