You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by wi...@apache.org on 2015/11/12 15:56:53 UTC

[10/18] 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-588
Commit: a377e5e00b16a0b93f5baf1c7402d692b2ffc59b
Parents: 56bcb6d
Author: Dietmar <dg...@gmail.com>
Authored: Fri Oct 2 13:10:49 2015 +0200
Committer: Dietmar <dg...@gmail.com>
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("/");