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 BBA7418D8F for ; Mon, 12 Oct 2015 06:54:23 +0000 (UTC) Received: (qmail 41282 invoked by uid 500); 12 Oct 2015 06:54:17 -0000 Delivered-To: apmail-marmotta-commits-archive@marmotta.apache.org Received: (qmail 41225 invoked by uid 500); 12 Oct 2015 06:54:17 -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 41207 invoked by uid 99); 12 Oct 2015 06:54:17 -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; Mon, 12 Oct 2015 06:54:17 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 07915DFDE1; Mon, 12 Oct 2015 06:54:17 +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: Mon, 12 Oct 2015 06:54:18 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/6] marmotta git commit: MARMOTTA-618 - strip leading spaces from header string! MARMOTTA-618 - strip leading spaces from header string! Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/a377e5e0 Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/a377e5e0 Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/a377e5e0 Branch: refs/heads/MARMOTTA-584 Commit: a377e5e00b16a0b93f5baf1c7402d692b2ffc59b Parents: 56bcb6d Author: Dietmar Authored: Fri Oct 2 13:10:49 2015 +0200 Committer: Dietmar Committed: Fri Oct 2 13:10:49 2015 +0200 ---------------------------------------------------------------------- .../java/org/apache/marmotta/commons/http/MarmottaHttpUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/marmotta/blob/a377e5e0/commons/marmotta-commons/src/main/java/org/apache/marmotta/commons/http/MarmottaHttpUtils.java ---------------------------------------------------------------------- diff --git a/commons/marmotta-commons/src/main/java/org/apache/marmotta/commons/http/MarmottaHttpUtils.java b/commons/marmotta-commons/src/main/java/org/apache/marmotta/commons/http/MarmottaHttpUtils.java index 46f38f5..ceb3eee 100644 --- a/commons/marmotta-commons/src/main/java/org/apache/marmotta/commons/http/MarmottaHttpUtils.java +++ b/commons/marmotta-commons/src/main/java/org/apache/marmotta/commons/http/MarmottaHttpUtils.java @@ -128,8 +128,8 @@ public class MarmottaHttpUtils { public static ContentType parseContentType(String c) { if (StringUtils.isBlank(c)) return null; - - String mt[] = c.split(";"); + // be sure to trim leading and trailing spaces + String mt[] = c.trim().split(";"); String[] tst = mt[0].split("/");