Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

STANBOL-19 - remove what follows semicolon in content type

git-svn-id: https://svn.apache.org/repos/asf/incubator/stanbol/trunk@1064723 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit 5ead0365beb9c3bf26953d5942c623a783c823d7 1 parent a42ff48
@bdelacretaz bdelacretaz authored
View
3  ...eneric/servicesapi/src/main/java/org/apache/stanbol/enhancer/servicesapi/helper/InMemoryContentItem.java
@@ -49,6 +49,9 @@ public InMemoryContentItem(String id, byte[] content, String mimeType,
}
if (mimeType == null) {
mimeType = "application/octet-stream";
+ } else {
+ // Keep only first part of content-types like text/plain ; charset=UTF-8
+ mimeType = mimeType.split(";")[0].trim();
}
if (content == null) {
content = new byte[0];
Please sign in to comment.
Something went wrong with that request. Please try again.