Repository: marmotta Updated Branches: refs/heads/develop 56bcb6d29 -> a377e5e00
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/develop Commit: a377e5e00b16a0b93f5baf1c7402d692b2ffc59b Parents: 56bcb6d Author: Dietmar <[email protected]> Authored: Fri Oct 2 13:10:49 2015 +0200 Committer: Dietmar <[email protected]> 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("/");
