X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.util%2Fsrc%2Forg%2Fargeo%2Futil%2Fdav%2FDavServerHandler.java;h=29d689dbb233c7dca5a38163f6b3a8e281c4d33d;hb=b897c27d370ad4772b5ae4b2c22cc505ef5d1a3f;hp=f9fba4761c62b26a91616f3afa64a0e69609ef75;hpb=ea7d6818525ff88cc6b9ed0957c912545bd8eb81;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.util/src/org/argeo/util/dav/DavServerHandler.java b/org.argeo.util/src/org/argeo/util/dav/DavServerHandler.java index f9fba4761..29d689dbb 100644 --- a/org.argeo.util/src/org/argeo/util/dav/DavServerHandler.java +++ b/org.argeo.util/src/org/argeo/util/dav/DavServerHandler.java @@ -13,17 +13,21 @@ public class DavServerHandler implements HttpHandler { public void handle(HttpExchange exchange) throws IOException { String method = exchange.getRequestMethod(); if (DavMethod.PROPFIND.name().equals(method)) { - handle(exchange); + handlePROPFIND(exchange); } else if (HttpMethod.GET.name().equals(method)) { - exchange.getResponseBody().write("Hello Dav!".getBytes()); + handleGET(exchange); } else { throw new IllegalArgumentException("Unsupported method " + method); } } + protected void handleGET(HttpExchange exchange) { + throw new UnsupportedOperationException(); + } + protected DavResponse handlePROPFIND(HttpExchange exchange) { - return null; + throw new UnsupportedOperationException(); } }