mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 09:21:49 -05:00
Caldav: implement HEAD request
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@570 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
4db6c022b5
commit
7fa2598a24
@ -243,6 +243,10 @@ public class CaldavConnection extends AbstractConnection {
|
|||||||
} else if (request.isGet()) {
|
} else if (request.isGet()) {
|
||||||
ExchangeSession.Event event = session.getEvent(request.getExchangeFolderPath(), eventName);
|
ExchangeSession.Event event = session.getEvent(request.getExchangeFolderPath(), eventName);
|
||||||
sendHttpResponse(HttpStatus.SC_OK, null, "text/calendar;charset=UTF-8", event.getICS(), true);
|
sendHttpResponse(HttpStatus.SC_OK, null, "text/calendar;charset=UTF-8", event.getICS(), true);
|
||||||
|
} else if (request.isHead()) {
|
||||||
|
// test event
|
||||||
|
session.getEvent(request.getExchangeFolderPath(), eventName);
|
||||||
|
sendHttpResponse(HttpStatus.SC_OK, null, "text/calendar;charset=UTF-8", (byte[])null, true);
|
||||||
} else {
|
} else {
|
||||||
sendUnsupported(request);
|
sendUnsupported(request);
|
||||||
}
|
}
|
||||||
@ -825,6 +829,10 @@ public class CaldavConnection extends AbstractConnection {
|
|||||||
return "GET".equals(command);
|
return "GET".equals(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isHead() {
|
||||||
|
return "HEAD".equals(command);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isPut() {
|
public boolean isPut() {
|
||||||
return "PUT".equals(command);
|
return "PUT".equals(command);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user