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:
parent
8c5358b931
commit
8d63d2d034
@ -919,7 +919,7 @@ public class CaldavConnection extends AbstractConnection {
|
|||||||
public void sendUnauthorized() throws IOException {
|
public void sendUnauthorized() throws IOException {
|
||||||
HashMap<String, String> headers = new HashMap<String, String>();
|
HashMap<String, String> headers = new HashMap<String, String>();
|
||||||
headers.put("WWW-Authenticate", "Basic realm=\"" + BundleMessage.format("UI_DAVMAIL_GATEWAY") + '\"');
|
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 {
|
protected class ChunkedResponse {
|
||||||
Writer writer;
|
Writer writer;
|
||||||
String contentType;
|
|
||||||
|
|
||||||
protected ChunkedResponse(int status, String contentType) throws IOException {
|
protected ChunkedResponse(int status, String contentType) throws IOException {
|
||||||
writer = new OutputStreamWriter(new BufferedOutputStream(new OutputStream() {
|
writer = new OutputStreamWriter(new BufferedOutputStream(new OutputStream() {
|
||||||
|
Loading…
Reference in New Issue
Block a user