Return-Path: X-Original-To: apmail-marmotta-commits-archive@minotaur.apache.org Delivered-To: apmail-marmotta-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0B2C918F93 for ; Wed, 1 Jul 2015 10:28:17 +0000 (UTC) Received: (qmail 83716 invoked by uid 500); 1 Jul 2015 10:28:16 -0000 Delivered-To: apmail-marmotta-commits-archive@marmotta.apache.org Received: (qmail 83509 invoked by uid 500); 1 Jul 2015 10:28:16 -0000 Mailing-List: contact commits-help@marmotta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@marmotta.apache.org Delivered-To: mailing list commits@marmotta.apache.org Received: (qmail 83116 invoked by uid 99); 1 Jul 2015 10:28:16 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Jul 2015 10:28:16 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4FFDCDFF78; Wed, 1 Jul 2015 10:28:16 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: wikier@apache.org To: commits@marmotta.apache.org Date: Wed, 01 Jul 2015 10:28:39 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [25/30] marmotta git commit: MARMOTTA-598: Expose DELETE in the Allow-Header for LDP 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/MARMOTTA-588 Commit: c271df95f5867bedf8260b369f4b26adca053806 Parents: 5a29eba Author: Jakob Frank Authored: Fri May 8 13:12:14 2015 +0200 Committer: Jakob Frank 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("*/*")); }