1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-13 19:22:22 -05:00

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
This commit is contained in:
mguessan 2009-11-13 21:39:33 +00:00
parent 8c5358b931
commit 8d63d2d034

View File

@ -919,7 +919,7 @@ public class CaldavConnection extends AbstractConnection {
public void sendUnauthorized() throws IOException {
HashMap<String, String> headers = new HashMap<String, String>();
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() {