Repository: marmotta Updated Branches: refs/heads/develop 5a29ebaba -> c271df95f
MARMOTTA-598: Expose DELETE in the Allow-Header for LDP Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/c271df95 Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/c271df95 Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/c271df95 Branch: refs/heads/develop Commit: c271df95f5867bedf8260b369f4b26adca053806 Parents: 5a29eba Author: Jakob Frank <[email protected]> Authored: Fri May 8 13:12:14 2015 +0200 Committer: Jakob Frank <[email protected]> Committed: Fri May 8 13:12:14 2015 +0200 ---------------------------------------------------------------------- .../platform/ldp/webservices/LdpWebService.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/marmotta/blob/c271df95/platform/marmotta-ldp/src/main/java/org/apache/marmotta/platform/ldp/webservices/LdpWebService.java ---------------------------------------------------------------------- diff --git a/platform/marmotta-ldp/src/main/java/org/apache/marmotta/platform/ldp/webservices/LdpWebService.java b/platform/marmotta-ldp/src/main/java/org/apache/marmotta/platform/ldp/webservices/LdpWebService.java index 0f7f251..31ee20d 100644 --- a/platform/marmotta-ldp/src/main/java/org/apache/marmotta/platform/ldp/webservices/LdpWebService.java +++ b/platform/marmotta-ldp/src/main/java/org/apache/marmotta/platform/ldp/webservices/LdpWebService.java @@ -688,17 +688,17 @@ public class LdpWebService { log.debug("Adding required LDP Headers (OPTIONS, GET); see Sec. 8.2.8 and Sec. 4.2.2.2"); if (ldpService.isNonRdfSourceResource(connection, resource)) { // Sec. 4.2.8.2 - log.trace("<{}> is an LDP-NR: GET, HEAD, PUT and OPTIONS allowed", resource); - builder.allow(HttpMethod.GET, HttpMethod.HEAD, HttpMethod.PUT, HttpMethod.OPTIONS); + log.trace("<{}> is an LDP-NR: GET, HEAD, PUT, DELETE and OPTIONS allowed", resource); + builder.allow(HttpMethod.GET, HttpMethod.HEAD, HttpMethod.PUT, HttpMethod.DELETE, HttpMethod.OPTIONS); } else if (ldpService.isRdfSourceResource(connection, resource)) { if (ldpService.getInteractionModel(connection, resource) == LdpService.InteractionModel.LDPR) { - log.trace("<{}> is a LDP-RS (LDPR interaction model): GET, HEAD, PUT, PATCH and OPTIONS allowed", resource); + log.trace("<{}> is a LDP-RS (LDPR interaction model): GET, HEAD, PUT, DELETE, PATCH and OPTIONS allowed", resource); // Sec. 4.2.8.2 - builder.allow(HttpMethod.GET, HttpMethod.HEAD, HttpMethod.PUT, HTTP_METHOD_PATCH, HttpMethod.OPTIONS); + builder.allow(HttpMethod.GET, HttpMethod.HEAD, HttpMethod.PUT, HttpMethod.DELETE, HTTP_METHOD_PATCH, HttpMethod.OPTIONS); } else { // Sec. 4.2.8.2 - log.trace("<{}> is a LDP-RS (LDPC interaction model): GET, HEAD, POST, PUT, PATCH and OPTIONS allowed", resource); - builder.allow(HttpMethod.GET, HttpMethod.HEAD, HttpMethod.POST, HttpMethod.PUT, HTTP_METHOD_PATCH, HttpMethod.OPTIONS); + log.trace("<{}> is a LDP-RS (LDPC interaction model): GET, HEAD, POST, PUT, DELETE, PATCH and OPTIONS allowed", resource); + builder.allow(HttpMethod.GET, HttpMethod.HEAD, HttpMethod.POST, HttpMethod.PUT, HttpMethod.DELETE, HTTP_METHOD_PATCH, HttpMethod.OPTIONS); // Sec. 4.2.3 / Sec. 5.2.3 builder.header(HTTP_HEADER_ACCEPT_POST, LdpUtils.getAcceptPostHeader("*/*")); }
