marmotta-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wik...@apache.org
Subject [2/6] marmotta git commit: MARMOTTA-618 - strip leading spaces from header string!
Date Mon, 12 Oct 2015 06:54:18 GMT
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 <dglachs@gmail.com>
Authored: Fri Oct 2 13:10:49 2015 +0200
Committer: Dietmar <dglachs@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("/");
 


Mime
View raw message